Git How to Revert/Undo Commit

October 18th, 2011 by Regaz

If you want to Revert/Undo a Commit:

  • Find the Commit Hash
    git log

    Grab the first 5 Chars of the Hash of your Latest Commit, also if you want Revert more than one commit you need go back Step-by-Step beginning by the Latest one.

  • Revert your Commit
    git revert --no-edit xyzhk
(Visited 1 times, 1 visits today)

Tags: ,