Revert local Sourcetree repo to master

后端 未结 1 764
面向向阳花
面向向阳花 2021-01-15 17:48

I\'m new to Sourcetree and have created a mess locally, with 7 ahead commits compared to the origin/master. I want to ignore and remove everything I\'ve done locally and st

相关标签:
1条回答
  • 2021-01-15 17:55

    You can set your current master to match the origin master by:

    Check out the master branch. Double click the branch, or open the terminal and type git checkout master

    Then reset the branch to origin master. Locate origin/master in the log, right click, click "Reset current branch to this commit" and select hard from the dialog that comes up. Or use the command git reset --hard origin/master

    0 讨论(0)
提交回复
热议问题