0

I want to create local branches for all existing remotes except master one.

I am new to git so any help is appreciated.

Thanks

dsa
  • 175
  • 1
  • 2
  • 10
  • _Why_ do you want to create local branches? You do realize Git already downloads all remote branches to your repo (use `git branch -a` to see them)? – sleske Mar 06 '17 at 10:10
  • Possible duplicate of [How to fetch all git branches](http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches) – sleske Mar 06 '17 at 10:10

2 Answers2

0

If you are using git command-line, then first use this command

git fetch

then you can switch to what ever branch you need like

git checkout <branch-name>

To know branch-names on remote, use this (list of remote branches)

git branch -v -r
Lali
  • 2,816
  • 4
  • 30
  • 47
0

You can directly create a branch with checkout command using -b:

git checkout -b <branch-name>
VSuarez
  • 1
  • 1