Rebase feature branch onto another feature branch

后端 未结 3 913
渐次进展
渐次进展 2020-11-30 16:33

I have two (private) feature branches that I\'m working on.

a -- b -- c                  <-- Master
     \\     \\
      \\     d -- e           <-- Br         


        
3条回答
  •  旧巷少年郎
    2020-11-30 16:54

    Note: if you were on Branch1, you will with Git 2.0 (Q2 2014) be able to type:

    git checkout Branch2
    git rebase -
    

    See commit 4f40740 by Brian Gesiak modocache:

    rebase: allow "-" short-hand for the previous branch

    Teach rebase the same shorthand as checkout and merge to name the branch to rebase the current branch on; that is, that "-" means "the branch we were previously on".

提交回复
热议问题