Git Revert

Git Revert 1

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>

Default image
Vishal Devxo
Vishal Devxo is a DevOps engineer and a Backend developer, he spends all his time for creating good tutorials with better visuals and blogging, developed some projects based on Python-Django, some hacking modules and scripts in python