A request for all, please avoid doing merge commits on your Git repo.
When these hit the shared repo it can cause Git to try and "fix" [1] the
commit when rebasing.

The way I do commits with Git is to rebase my work branch on master
before merging it into master. That way it's a true merge and not a
merge commit. To do this:

1. Rebase your work branch:

 task-branch $ git rebase -i master

2. Fix any merge issues on the work branch until you get a clean set of
   commits.
3. Switch to master and then merge your branch:

  task-branch $ git checkout master
  master-branch $ git merge task-branch

Thanks.


[1] On my task branches I use autofix to merge changes back to the
appropriate previous commit in my branch. When I'm ready to merge them I
use "git rebase -i HEAD~[some # of commits] --autofix". Git then takes
all of the autofix commits and puts them after the appropriate commit to
merge together.

If I a merge commit is accidentally included in there then git will try
to rebase that merge commit and all hell can break loose.


-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/

Attachment: pgpfWWtjMVeGY.pgp
Description: PGP signature

Reply via email to