Skip to content

Instantly share code, notes, and snippets.

@justinfrench
Created May 10, 2012 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinfrench/2651020 to your computer and use it in GitHub Desktop.
Save justinfrench/2651020 to your computer and use it in GitHub Desktop.
git aliases for tracking and publishing branches
[alias]
current-branch = !git branch | grep '^*' | sed s/\\*\\ //
track = !git branch --set-upstream $(git current-branch) origin/$(git current-branch)
publish = !git push origin $(git current-branch) && echo $(git track)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment