How to revert code to the previous version:
git reset --hard HEAD~1
or soft if you don't need to keep the change:
git reset --hard HEAD~1
Also, you can reset all changes by command:
git checkout HEAD
How to revert code to the previous version:
git reset --hard HEAD~1
or soft if you don't need to keep the change:
git reset --hard HEAD~1
Also, you can reset all changes by command:
git checkout HEAD
Top comments (0)