Revert to previous commit
Go to previous commit without saving changes.
git reset --hard HEAD
with HEAD is the last commit in your current branch
Revert to a older commit
# Get the commit code first with
git log
#Then use it to do a reset
git reset commit_code_here
# Move pointer to that head
git reset --soft HEAD@{1}
git commit -m "Reverting a potential stupidity"
# Apply changes
git reset --hard
# Git push everything
git push



Leave a comment