How to checkout previous revision? [message #932047] |
Wed, 03 October 2012 15:37  |
Eclipse User |
|
|
|
Dear all,
I have an Acceleo project in my local Git repository that is all messed up and I'd need to revert back to a previous revision. In the documentation it says I must right click on a revision item in the History view and select Commit Revert. The problem is that the History view is shown completely empty. Is there any other way to revert to a previous revision? or even to checkout the project at an earlier revision?
Thank you,
Luís
|
|
|
|
|
Re: How to checkout previous revision? [message #933088 is a reply to message #933060] |
Thu, 04 October 2012 14:17   |
Eclipse User |
|
|
|
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.
|
|
|
|
|
|
|
Re: How to checkout previous revision? [message #934183 is a reply to message #933187] |
Fri, 05 October 2012 14:35  |
Eclipse User |
|
|
|
Hello again,
I found out what's wrong and it is not good. When I understand that something was wrong with my code and decided to go back to a previous version I deleted the project from the Workspace, thinking that would be the correct procedure (I occasionally do it this way with SVN). It happens that this not only deleted the project from the workspace but also from the repository.
I have alternative backups, but I'm going back in time about 2 months :S
Thanks for all the help in any case,
Luís
|
|
|
Powered by
FUDForum. Page generated in 0.05615 seconds