Skip to content

Instantly share code, notes, and snippets.

@sulram
Created November 19, 2019 18:54
Show Gist options
  • Save sulram/8acea3d72d6bbdd97a846393c55a9e23 to your computer and use it in GitHub Desktop.
Save sulram/8acea3d72d6bbdd97a846393c55a9e23 to your computer and use it in GitHub Desktop.
git
# git reset current branch HEAD to the commit
git reset --hard <commit-hash>
git push --force origin master
# git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment