Bruno Haible <bruno <at> clisp.org> writes:

> This means that someone did commits at the same time as I. This resolved it:
> 
>   $ git stash                   # save my private changes
>   $ git pull                    # get the public commits
>   $ gitk                        # shows a lozange
>   $ git rebase origin/master
>   $ gitk                        # shows a linear list of commits again.
>   $ git stash apply             # restore my private changes
>   $ git push

Or in fewer commands (with new enough git - I think this was 1.5.4):

$ git stash
$ git pull --rebase
$ git stash apply
$ git push

Or with even newer git (introduced in the as-yet-unreleased 1.5.5), this one-
time action:

$ git config branch.master.rebase true

will make subsequent

$ git pull

on the master branch always do the desired rebase.

-- 
Eric Blake




Reply via email to