Skip to content

Instantly share code, notes, and snippets.

@laevandus
Last active June 30, 2020 11:41
Show Gist options
  • Save laevandus/2a09b861443264f8adcc6addcd7a44c5 to your computer and use it in GitHub Desktop.
Save laevandus/2a09b861443264f8adcc6addcd7a44c5 to your computer and use it in GitHub Desktop.
List of useful git commands I use.
# Rename local branches
git branch -m new_name
# Edit last 3 commits
# Note: rewrites history, therefore use it for local branches or for remote branches which can be force pushed
git rebase -i HEAD~3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment