Skip to content

Instantly share code, notes, and snippets.

@tobalsan
Last active August 29, 2015 14:04
Show Gist options
  • Save tobalsan/d9f4e29dc6e9b8b9f12f to your computer and use it in GitHub Desktop.
Save tobalsan/d9f4e29dc6e9b8b9f12f to your computer and use it in GitHub Desktop.
Git: manually set upstream for a branch
// Git 1.8
git branch -u remote/foo
// If not in branch foo
git branch -u remote/foo foo
// Git 1.7
git branch --set-upstream foo remote/foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment