Sourcetree - undo unpushed commits

前端 未结 4 1479
一个人的身影
一个人的身影 2020-12-12 09:08

I am using Sourcetree for Windows for a git-repository and would like to undo an unpushed commit.

Is that possible? If I do \"revert commit\", it creates a second co

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 10:08

    If you select the log entry to which you want to revert to then you can click on "Reset to this commit". Only use this option if you didn't push the reverse commit changes. If you're worried about losing the changes then you can use the soft mode which will leave a set of uncommitted changes (what you just changed). Using the mixed resets the working copy but keeps those changes, and a hard will just get rid of the changes entirely. Here's some screenshots:

提交回复
热议问题