Skip to content

Instantly share code, notes, and snippets.

@jeffchao
Created May 23, 2013 17:16
Show Gist options
  • Save jeffchao/5637740 to your computer and use it in GitHub Desktop.
Save jeffchao/5637740 to your computer and use it in GitHub Desktop.
Checking out an existing git branch and not getting a "merge commit" when pulling.
# Get a list of existing remote branches
git fetch origin
# Checkout the branch from that branch
git checkout -b branch_name origin/branch_name
git pull origin branch_name
git push origin branch_name # yields 'Everything up-to-date'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment