Skip to content

Instantly share code, notes, and snippets.

@riywo
Created February 21, 2013 20:47
Show Gist options
  • Save riywo/5008080 to your computer and use it in GitHub Desktop.
Save riywo/5008080 to your computer and use it in GitHub Desktop.
sync git local branch to remote branch (origin)
$ export BRANCH=test
$ git fetch
$ git checkout $BRANCH || git checkout -b $BRANCH origin/$BRANCH
$ git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment