Git Revert

Git Revert

we cant delete any commits in the remote repository because they are been used by some other visitors .so revert is used to create a new commit without the older commit which we want don’t want to include.

Revert single commit

git revert <commit id>

Revert using HEAD~n

git revert HEAD~2

Revert current commit

git revert HEAD

Revert with commit ID

git revert -n <commit id>
Last updated on by vishal devxo