0

We are using git in a project having team size of six people. One accidentally do a wrong commit but realised after doing some more useful commits.

Is it possible to delete that particular commit in git?

LebRon
  • 755
  • 4
  • 24
  • Before reading the related questions, please find out if that user **pushed their commit to the central repository or not**. It is really important. – Nick Volynkin Jul 21 '15 at 11:17

1 Answers1

0

You can use revert:

git revert #commithash
Thomas Ayoub
  • 29,063
  • 15
  • 95
  • 142
  • 1
    Maybe a good idea to inform question author that `revert` does not actually delete a commit, but creates a new one which completely invert the original – Antwane Jul 21 '15 at 11:14