Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Revert Not Working

So i've got a develop branch with a commit that I want to revert. So I type in git revert <commit-hash>

But when it runs it says:

$ git revert 165702b305
On branch develop
nothing to commit, working directory clean

This commit has been tracked down as the culprit of a bug and id like to revert it, but for some reason its not working. Could it be corrupted somehow? Other answers and searches have not been able to help.

like image 841
Peter Foti Avatar asked Apr 25 '14 19:04

Peter Foti


1 Answers

I had the same issue.

Using the following snippet worked for me:

git revert --no-commit <commit-id> -n HEAD
like image 76
sudo Avatar answered Sep 22 '22 18:09

sudo