How to split last commit into two in Git

前端 未结 10 512
囚心锁ツ
囚心锁ツ 2020-12-07 06:23

I have two working branches, master and forum and I\'ve just made some modifications in forum branch, that I\'d like to ch

10条回答
  •  萌比男神i
    2020-12-07 07:06

    I'm surprised nobody suggested git cherry-pick -n forum. This will stage the changes from the latest forum commit but not commit them - you can then reset away the changes you don't need and commit what you want to keep.

提交回复
热议问题