Skip to content

Instantly share code, notes, and snippets.

@saintsGrad15
Created October 5, 2017 14:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save saintsGrad15/2277be19724ec429e6dbed5c5750fe0d to your computer and use it in GitHub Desktop.
A function to create a new git branch and set its upstream repo
function newBranch()
{
git checkout -b "$1"
if [ $? -eq 0 ]; then
git push -u
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment