Skip to content

Instantly share code, notes, and snippets.

@ryenus
Created May 8, 2012 12:54
Show Gist options
  • Select an option

  • Save ryenus/2634682 to your computer and use it in GitHub Desktop.

Select an option

Save ryenus/2634682 to your computer and use it in GitHub Desktop.
git delete/fetch remote reference
# delete a remote reference
git branch -r -d <remote/ref>
# e.g.
git branch -r -d origin/master
# fetch a remote reference
git fetch <upstream-remote> :[refs/]remotes/<remote/ref>
# e.g.
git fetch origin :refs/remotes/origin/master
git fetch origin :remotes/origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment