This is command to show remote branches:

$ git remote

$ git remote show origin's password:
* remote origin
  Fetch URL:
  Push  URL: user@example:/home/user/git/project.git
  HEAD branch: master
  Remote branches:
    develop                tracked
    feature/feature1       tracked
    master                 tracked
    release                tracked
  Local branches configured for 'git pull':
    develop                merges with remote develop
    feature/feature1       merges with remote feature/feature1
    master                 rebases onto remote master
    release                merges with remote release
  Local refs configured for 'git push':
    develop                pushes to develop                (up to date)
    feature/feature1       pushes to feature/feature1       (up to date)
    master                 pushes to master                 (up to date)
    release                pushes to release                (up to date)

This is command to checkout remote branch to local, and set the local branch to track remote branch:
git checkout --track origin/branchname

2 thoughts on “Checkout branch from git server to local

  1. Woah! I’m really digging the template/theme of this blog. It’s simple, yet effective. A lot of times it’s tough to get that “perfect balance” between usability and visual appearance. I must say that you’ve done a awesome job with this. In addition, the blog loads super fast for me on Safari. Excellent Blog!


Leave a reply


<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>