Skip to content

Instantly share code, notes, and snippets.

@aliartiza75
Created July 8, 2019 11:15
Show Gist options
  • Save aliartiza75/cd1e2e5af68b4e98075180af22e412bf to your computer and use it in GitHub Desktop.
Save aliartiza75/cd1e2e5af68b4e98075180af22e412bf to your computer and use it in GitHub Desktop.
revert commits and sync remote repo with local
# to check the log history
git log
# to revert back number of commits
git reset --hard HEAD~<number-of-commit>
# to sync remote branch with local
git push --force origin <branch-name>
@ChrisArdon
Copy link

thanks dude!!!. Really helpful. I was trying to sync a hard reset made in the local repo with the remote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment