|Re: How to checkout previous revision? [message #933088 is a reply to message #933060]
||Thu, 04 October 2012 18:17
| R Shapiro
Registered: June 2011
You can show the history of the repository as a whole by right-clicking the repository root in the Git Repositories view and selecting Show In -> History.|
Or you can enable the link "Link with Editor" toggle and simply select the repository root.
Or you can right-click any project in an Explorer view , run Team -> Show in History and enable the toggle called "Show all changes in repository containing selected resource."
There are probably other ways to get here as well.
The "checkout" right-click action on a history entries works fine however you get there. Of course Git checkout applied to a commit doesn't revert the repository. it simply puts your working directory and index in a state that corresponds to the given commit.
If you pushed one or more commits and now you want to undo them, you should run "revert" on each of the commits (in reverse order), not "checkout". Then push the resulting new commits.
If you have not yet pushed any of the problematic commits, or not even committed the changes yet, then the operation you want is "reset", in other words, move the branch pointer back, optionally adjusting the index and working directory as well. In this last case you probably want the "hard" variant, which will adjust the index and working directory as well as moving the branch pointer.
Powered by FUDForum
. Page generated in 0.11389 seconds