Skip to content

Instantly share code, notes, and snippets.

@PieterScheffers
Created September 4, 2018 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PieterScheffers/192521aef40be086b5c10bb841ed6376 to your computer and use it in GitHub Desktop.
Save PieterScheffers/192521aef40be086b5c10bb841ed6376 to your computer and use it in GitHub Desktop.
Git Cheatsheet
# Force push
git push --force
# Pull origin when origin has been force pushed (from master branch)
git reset --hard origin/master
# Base feature branch on new force-pushed master
# Assumes feature branch has 2 commits
git rebase HEAD~2 myfeature --onto master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment