Search code examples
gitversion-controladobe-brackets

Brackets Git: how to go back to last commit


I'm new to git and using Brackets (Mac) as my main editor. There is a nice brackets git extension. I installed the extension successfully. But – how – can I return / revert / go back / to a commit in history? There is no Button for sth. like this at all. A friend of mine, using git for years on ubuntu, failed as well. As I am new to git I do not even know what the right terminology is for what I want to do. So maybe its all about my low understanding of git itself. (The setup is not complicated: I work alone, on local machine).

Would be very thankful for replies.


Solution

  • If you want to return to a history commit in git log, you can do it via terminal or git bash (git command line).

    First you can click show history, then the commit history will listed from new to old. Find the commit you want to return.

    Then click open bash/terminal console, and use the command git checkout <commit>. Then the HEAD will point to commit you specified.

    enter image description here

    enter image description here

    If you want to go back to the latest commit, you can use git checkout branchname.