+6

Move or copy (cherry-pick) commit(s) to other branch

Thomas Singer 6 years ago updated 6 years ago 1

Situation: after one or more commits you notice you have committed to the wrong branch. Now applying the commits to the correct branch means to:

- checkout the correct branch

- cherry-pick the new commits from the wrong branch

- reset the wrong branch to the commit before the cherry-picked commits

It would be nice if this could be done with one high-level command.

Yes, "Move Commit to Branch..." would help my use case - I didn't commit to the wrong branch, but I want to have one or more commits that only exist on my working branch also on master/develop (to share them earlier than my branch will merge).  So my first two steps are the same as yours but my third step is a rebase on master/develop (or whatever is the target branch).