How can I rebase multiple branches at once?

后端 未结 5 608
说谎
说谎 2020-12-24 01:00

I currently work on a project in which SVN is used as a repository. Locally, I do several \"experiments\" with the code that I don\'t want to commit to the repo. Therefore I

5条回答
  •  醉酒成梦
    2020-12-24 01:10

    I just want to mention that GoZoner's sequence has a mistake in the first (and last) line. exp1 is not the upstream, but the branch you want to rebase.

    In order to start the sequence, you need to have master as upstream, i.e. git rebase --onto master master exp1 or short, without --onto it would be git rebase master exp1. The total correct sequence for the example from the question would then be:

    git rebase master exp1
    git rebase --onto c2' c2 exp2
    git rebase --onto c1' c1 exp3
    git rebase master exp4
    

提交回复
热议问题