# Reset to a specific GIT commit and delete everything that came after
# USE WITH CAUTION
# This will cause any newer commits to be deleted
# -----------------------------------
git checkout HASH_1f
git branch -f master
git push -f origin master
git fetch -f origin master:master
# if others need to resync
# git rebase --onto master mergecommit_abc123 oldMaster
# -----------------------------------
# Revert only the last commit:
# -----------------------------------
git reset --soft HEAD~
git commit -aC ORIG_HEAD
Nincsenek megjegyzések:
Megjegyzés küldése