How to fix committing to the wrong Git branch?

前端 未结 11 1417
小鲜肉
小鲜肉 2020-11-29 14:09

I just made a perfectly good commit to the wrong branch. How do I undo the last commit in my master branch and then take those same changes and get them into my upgrade bran

11条回答
  •  清歌不尽
    2020-11-29 14:39

    If you run into this issue and you have Visual Studio, you can do the following:

    Right-click on your branch and select View History:

    Right-click on commit you want to go back to. And Revert or Reset as needed.

提交回复
热议问题