{section: Checklist of things to do before running "git push"} 1: View and examine the commits to push with 'git log' {code} $ git log origin/.. {endcode} 1:: Check to see if you should combine multiple commits *::: You should definitely combine if: *:::: Any of the commits "checkpoints" *:::: Any of the commits "fix previous commit" *::: You should consider combining if: *:::: Any of the commits is a partial implementation *:::: Two or more of the commits could be considered to be a logical group *::: See {wiki: GitSquash Squashing git commits} for details on how to do this 1::Verify that all commit messages {wiki: CommitMessages follow our conventions}, esp that the gittrac ticket number in the commit comment. Examples: *:::=Fix bug that caused the foo daemon to crash when bar happens {quote:(#123)}= *:::=Implemented {quote: #234} to allow the user to do something really cool= *:::=Fixed bug {quote: (#345)} that caused bad things to happen= *::: *Note*: Enclosing the ticket number in square brackets ="[]"= (i.e. {quote: "[#456]"}) will cause =GitTrac= to ignore it. 1::: If you know git well enough, you can change the last *-- only the last --* commit message via: *:::: =git commit --amend= *:::: *Note*: If you're not familiar with git, use the below method. *:::: *Note*: This seems to do strange things if you've run 'git add' since the commit. 1::: You can edit commit messages _that haven't been pushed_ using the same basic mechanism as {wiki: GitSquash Squashing git commits} -- see {wiki: GitEditCommit Editing git commit messages} for details. 1::: It's easy and safer to edit the commit message in =GitTrac= after you do the push. *:::: Find the relevant commit in =GitTrac=, and click on the =GitTrac= commit ID (the 5-digit number in square brackets) hyperlink. We {link: rptview?rn=24 have a report} that makes it easy to find all your recent commits in gittrac. *:::: Edit the commit message to include the ticket number as above, then save your changes. *:::: *Note*: =GitTrac= edits to git commit messages *do not* affect the actual git repository -- if you run "git log", you'll see your original commit message, but =GitTrac= will use the edited message. 1::: After the push, you can also associate the commit with the appropriate ticket(s) without editing the commit message. *:::: Find the relevant commit in =GitTrac= and note the =GitTrac= commit ID (the 5-digit number in square brackets). *:::: Edit the appropriate ticket, add the commit ID *without the brackets* to the field `Associated Check-ins', and apply your changes. 1:: Verify that all of the commits that you expect are present. 1:: Verify that there aren't unexpected commits or commits that are only 1/2 committed. 1:: Verify that the name and email address of the person doing the commit (probably you) is correct when you do a =git log=. It could show up as =unknown= if, for instance, you never told git your name and email address via =git config=.... did you do all the "Preliminary Setup" steps on {wiki: ManagingCondorSourceTreesWithGit this page} ? 1: Run 'git diff' and verify that the diffs are correct. 1: If you added new files, did you 1::put our Copyright notice at the top of the file? 1:: #include condor_common.h as the first include file (and if not, do you have a specific reason) ? 1: Did you build and test your changes?