Git: move a commit “on top”

前端 未结 2 1005
孤独总比滥情好
孤独总比滥情好 2020-12-14 00:45

Let\'s say in master I have a feature disabled. I work on that feature on branch feature, so I have a special commit $ there that just

2条回答
  •  情歌与酒
    2020-12-14 01:37

    git rebase -i B, and then move $ to the end of the list that shows up in your editor. It will start out as the first line in the file that opens. You could also just delete that line entirely, which will just drop that commit out of your branch's history.

提交回复
热议问题