Reputation: 660
I see Revert Commit. Will that erase current commits? I just want to pull a previous commit without affecting the overall project. Thanks.
Upvotes: 2
Views: 2678
Reputation: 2255
Right click on your project and then Git->Checkout->Checkout Revision... You won't loose your commits, you only set the head to a specific commit/revision.
Upvotes: 2
Reputation: 787
I hope this is the answer for you
Scenario:
1)User selects a versioned context and invokes 'revert' from the main menu
2)Dialog pops up asking for additional revert options - revisions etc.
3)A new revision is created which reverts the previous commits
Command Line
1) You have to see all commits. Use git log
. You will see the commits with hascode, then
2)Then use git reset --hard <SHAsum of your commit>
See this
Upvotes: 2