Well, that is not (entirely) true.
The problem is that when I clone a repo, I can't specify a given branch, and git only seemed to fetch the master branch.
When you clone a repository, you fetch all branches, with all the history (I thought that happened in hg but not in git, well anyway).
What happens then, if I don't see other branches than 'master'?
type:
git branchAnd you'll only see master branch. Other branches are hidden. To see them you should type:
git branch -a
So your branches are effectively there. To use any of them, you should
git checkout -b local_branch_name origin/remote_branch_nameI think what that line does is create a new branch and filling it with the fetched branch with that name, and bind the pull and push paths to the remote ones.
Another way?
In other sources, I've found that simply pulling with:
git pull origin Branch_namewill do the same, but, when I tried it, it downloaded/extracted the files, but without changing to the branch name.
Question
Now the question is:
What happens if I modify two branches, and then just "git push" ? will it push both branches? That's what I'll try in next days, and after a bit of experimenting, I'll post back.
Btw, here are a couple of links you can read for a bit more info.
No hay comentarios:
Publicar un comentario