Friday, August 19, 2022

Back to previous commit

 # Resets index to former commit; replace '56e05fced' with your commit code

git reset 56e05fced 

# Moves pointer back to previous HEAD
git reset --soft HEAD@{1}

git commit -m "Revert to 56e05fced"

# Updates working copy to reflect the new commit
git reset --hard

No comments:

Post a Comment