I can t find the branches after forking and cloning the git project..I have created I remote called upstream and after fetching it and typing git branch -a I get
* master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/docs
remotes/origin/master
remotes/upstream/develop
remotes/upstream/docs
remotes/upstream/master
But I can t find the branch folders of the original project. Any ideas..?
The general (command line) syntax to switch to a remote branch is:
git fetch origin
git checkout -b someBranch origin/someBranch
A little more background on branches. As you noticed, branches aren't stored in folders. Git actually stores information as deltas - changes from a given set of files, ie the master branch. When you checkout a branch, you are actually telling git to retrieve the specific set of deltas pertaining to this branch and apply them to the current set of files.
SVN, which is another version control platform, by comparison stores its branches in a directory-like structure, but also takes up more space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With