On Sunday, August 21, 2011, Mark Liversedge <liverse...@gmail.com> wrote:
> Hi,
> Dumb question. I'm working on a branch locally that is also over at
github. I fetch the latest from github with:
> Make sure I'm clean
> $ git checkout branch
> $ git reset --hard origin/branch
> $ git pull origin branch
> Make changes and commit then
> $ git push origin branch
> But when I pull other folks commits I get a merge commit and that gets
pushed up to github.
> I've come to the conclusion that my pull/push commands are flawed and I
should do this differently.
> How *should* I be doing this?
> TIA,
> Mark

There's nothing necessarily wrong with merge commits, but if you want to
straighten out your history before you push:

$ git fetch origin
$ git rebase origin/branch

If you had to resolve any conflicts in the merge commits, you'll have to do
that again during the rebase.

-- 

-PJ

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to