Skip to content

Instantly share code, notes, and snippets.

@gildegoma
Created August 25, 2011 23:13
Show Gist options
  • Save gildegoma/1172280 to your computer and use it in GitHub Desktop.
Save gildegoma/1172280 to your computer and use it in GitHub Desktop.
Git Branch Management

Rename a local branch

git branch -m <oldname> <newname>

Delete a remote branch

$ git push origin :<branch-simple-name>

Publish a local branch (with remote tracking enabled)

$ git push -u origin my-new-feature

'-u' option introduced since git 1.7, as helper to get local and remote branch in sync...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment