We've recently switched to Git and Gerrit, and are drafting the best 
practices workflow for our development team. One thing we want to avoid is 
"merge" commits that have two parents since if these commits fail Gerrit's 
review it is hard to rebase them. 

I know that "git pull" will do the "fetch" + "merge" that may create those 
two-parent commits. Instead we recommend to do:

on the feature branch:

git fetch
git rebase origin master
git pull --rebase origin master

The problem with this last command is that it does not put my local commit 
on top of commits from origin. So if I need to amend my last local commit - 
I can't - since it's not on top of history any longer. To amend this commit 
I have to run rebase --interactive, but we are trying to avoid commands 
that are either complicated or numerous. Is there a way to run git pull 
--rebase in such a way that my latest local commit ends up on the top of 
commit history?

Thank you!

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to