Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@peregrinogris
Created August 11, 2014 14:57
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 peregrinogris/bf92248a93ecdbf800dd to your computer and use it in GitHub Desktop.
Save peregrinogris/bf92248a93ecdbf800dd to your computer and use it in GitHub Desktop.
Push the current branch to remote origin and make it track the newly created remote branch.
#!/usr/bin/env bash
branch=`git branch | grep '*' | awk '{print $2}'`
git push -u origin $branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment