Skip to content

Instantly share code, notes, and snippets.

@probablycorey
Created July 5, 2016 21:07
Show Gist options
  • Save probablycorey/43b4b7475b5559406112d5c25e347138 to your computer and use it in GitHub Desktop.
Save probablycorey/43b4b7475b5559406112d5c25e347138 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
BRANCH=$(git branch | sed -n '/\* /s///p')
git branch --set-upstream-to=origin/$BRANCH $BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment