-1

I am not able to undo the commits in git. It shows technical errors while doing so.

I have tried to navigate to the folder for my git repo and expecting to solve the problem at the earliest.

ndc85430
  • 1,395
  • 3
  • 11
  • 17

2 Answers2

0

This post has explained undoing commits previously, presuming the issue is sourced in your local repository.

Link: How do I undo the most recent local commits in Git?

Anonymous
  • 73
  • 7
0

command:

git revert HEAD

you can mention the commit ID to revert the commit, if mentioned HEAD it will revert the last commit

Fedor
  • 17,146
  • 13
  • 40
  • 131