Subject: Re: put THEIR commits AFTER my commits with a single rebase command

From: Johannes Sixt <[email-masked]>
Date: Thu, 18 Apr 2013 08:31:05 +0200

Am 4/18/2013 7:18, schrieb Ilya Basin:
> desired result:
> 
>          A---B---C origin/master
>         /
>     D---E---F---G---A'---B'---C' *master
> 
> 
> 
> Variant 1:
> 
>     git branch -f tmp
>     git reset --hard origin/master
>     git rebase tmp

Variant 1a:

   git reset --hard origin/master
   git rebase @{1}

> 
> This variant is bad, because 'git reset --hard' checks out some files
> and 'git rebase' rewrites them again before applying commits. It's a
redundant job.
>
> Variant 2:
> 
>     git branch -f tmp origin/master
>     git rebase --onto master master tmp
>     git branch -f master
>     git checkout master
> 
> Too many commands. I want to do this with just one command. And I want
> to stay be on branch master in case of rebase conflicts.

Perhaps this one:

   git merge origin/master
   git rebase ORIG_HEAD

-- Hannes