0

So i'm new to branching, so far i have only a master branch. I would like to move specific existing commits that i have made from master to a new branch and remove those commits from master. An example:

current master:     c1-c2-c3-c4-c5-c6-c7-c8-c9

After creating newbranch:

master:    c1-c2-c5-c6-c9
                        \
newbranch:              c3-c4-c7-c8
  • https://stackoverflow.com/search?q=%5Bgit%5D+move+commits+different+branch – phd Dec 23 '19 at 03:09
  • In your case you create a new branch at `c4`, cherry-pick `c7` and `c8` into that branch, and remove these commits from master using interactive rebase. – phd Dec 23 '19 at 03:10

0 Answers0