How to checkout and reset using smartgit?

蓝咒 提交于 2019-12-20 04:52:18

问题


Need help in understanding the below

1). How do i check out to a particular commit and again revert back to the recent commit ?

Tried branch->checkout->same branch and check out to the previous commit, but when i did this the commits made after the one i checked out now got lost !

Its not in the list to checkout to recent commit !

2). How do i reset my head to a particular commit ?


回答1:


(1) Usually, branch refs won't be changed by a Check Out, so you may use Check Out again to switch back to your branch: simply select the corresponding branch for "Showing Branches" selector.

If the branch ref to your old head is actually lost, you can open the Log and use Query|Load All Commits to display all such heads, then add a temporary branch ref to the corresponding head and check out this head.

(2) Local|Reset should work for you.



来源:https://stackoverflow.com/questions/6213343/how-to-checkout-and-reset-using-smartgit

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