Skip to content

Instantly share code, notes, and snippets.

@lzcabrera
Last active August 29, 2015 14:03
Show Gist options
  • Save lzcabrera/7188eab355c8c72265a4 to your computer and use it in GitHub Desktop.
Save lzcabrera/7188eab355c8c72265a4 to your computer and use it in GitHub Desktop.
useful git commands I tend to forget
# Git command to update remote origin
git remote set-url origin [[*.git]]
git push origin --delete [branch-name]
# If you are working in a branch that is/will become a pull-request against master, you can rebase against your master branch. Make sure it is up to date
(my-branch)$ git rebase -i master
git remote update --prune
git gc --prune=now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment