How do you revert with sourcetree?

泪湿孤枕 提交于 2019-12-10 15:57:00

问题


What is the process to revert back to a previous commit if you are using sourcetree? Please no command line help, I understand how you would achieve the same result there but am specifically looking to do it with my friendly atlassian tool.


回答1:


What exactly do you mean by revert?

You can commit a reverse commit by rightclicking on a commit and selecting Reverse commit. This will effectively create a new commit that negates the changes you made in your selected commit. The commit with the changes you negated will still exist.

You can checkout an earlier commit by doubleclicking on an earlier commit or rightclicking and selecting checkout. This will change your code to the state it was for your selected commit, so without the changes from later commits. The commit with the changes you negated will still exist.

You can reset to an earlier commit. This will remove the commit with the changes you want to negate. (They can normally still be recovered using the reflog)



来源:https://stackoverflow.com/questions/36355304/how-do-you-revert-with-sourcetree

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!