Skip to content

Instantly share code, notes, and snippets.

@mogox
Created August 29, 2016 18:48
Show Gist options
  • Select an option

  • Save mogox/1a01fcf68339eaba5bde90f61cff9284 to your computer and use it in GitHub Desktop.

Select an option

Save mogox/1a01fcf68339eaba5bde90f61cff9284 to your computer and use it in GitHub Desktop.
Git shortcuts, or the things that I use and I forget

Adding a remote

git remote add upstream https://github.com/otheruser/repo.git

List of remotes

git remote -v

Cherry-pick a merge commit

git cherry-pick -m 1 <SHA5>

Delete merged branches

gco master
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d

Delete Remote tag

git push origin :refs/tags/release-169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment