I am trying to pull from a repository in Github. But I don\'t want to clone the master branch. I want to clone some other branch. When I try git clone
,
git clone
clones and creates remote-tracking branches for each branch. If you want to see available branches (after cloning), you type
git branch -l
To switch to a particular branch after cloning you do:
git checkout
where branchname is the name of the branch :)
If you want to clone and checkout a specific branch you do
git clone -b
The other commands you mention are for "updating" your current working copy. git pull
gets all changes from the remote repository and merges them while git fetch
only gets them without merging.