Skip to content

Instantly share code, notes, and snippets.

@justinfrench
Created January 6, 2012 10:36
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/1570038 to your computer and use it in GitHub Desktop.
Save justinfrench/1570038 to your computer and use it in GitHub Desktop.
Git aliases for tracking and publishing git branches (usage: `git publish`)
[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