Howto:Start using git: Difference between revisions

Jump to navigation Jump to search
m
→‎A handful of useful commands: The 50/72 commit message format
m (Copyediting; headings)
m (→‎A handful of useful commands: The 50/72 commit message format)
Line 17: Line 17:
; git checkout ''branchname'':  Checkout a certain branch (in essence switch to that branch and make it active)
; git checkout ''branchname'':  Checkout a certain branch (in essence switch to that branch and make it active)
; git add ''filename'':        Specify which new or modified files shall be added to the next commit (wildcards supported)
; git add ''filename'':        Specify which new or modified files shall be added to the next commit (wildcards supported)
; git commit -m "''Comment''":  Commit all files that you previously added using "git add" and add a short comment about your work
; git commit -m "''Message''":  Commit all files that you previously added using "git add" and add a short message about your work.
 
A common commit message format is the ''50/72 format'', a short summary (less than 50 characters) followed by an empty line and a longer summary with slightly longer lines (less than 72 characters each).


Because creating a new branch and checking it directly afterwards out, is such a common operation there is a short cut available: '''git checkout -b my-branch'''
Because creating a new branch and checking it directly afterwards out, is such a common operation there is a short cut available: '''git checkout -b my-branch'''

Navigation menu