Skip to content

Instantly share code, notes, and snippets.

@bergmeister
Created December 9, 2017 16:55
Show Gist options
  • Save bergmeister/892243f557fa3a79995920d9e187e5c8 to your computer and use it in GitHub Desktop.
Save bergmeister/892243f557fa3a79995920d9e187e5c8 to your computer and use it in GitHub Desktop.
Push a new git branch and automatically set the upstream
# Pushes a new branch and automatically sets the upstream
function Push-It
{
$branch = git rev-parse --abbrev-ref HEAD
git push --set-upstream origin $branch
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment