Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
git merge --no-ff -m "Merge [TRAFODION-XYZ] PR-12345 Whizbang feature" FETCH_HEAD
 OR
git merge --squash FETCH_HEAD
git commit  # edit comment, give good headline and detailed body
            # Also include phrase "This closes #<PR num>" substituting in the pull-request number

NOTES

  • Sometimes for changes with many commits, you might want to squash their branch into a single commit. If so, add the --squash option.
    • On the plus side, squashing a developer branch into single commit puts all the file related changes into a single commit. Easier to find, back-port, etc.
    • On the minus side, squashing breaks the change from the developer history. Be extra careful to edit the comment to clearly identify the developer and combined commit comments. 
  • If you forget the -m option, you end up with a less than helpful default comment.
    • Before you push the commit, you can fix the comment by:

      Code Block
      languagebash
      git commit --amend

...