Problem:
Wen/Raizhong
At the weekend at home changed the code, a new angular
version of the branch, and then push
to the coding.net
top.
Today, the company does not know how to pull this angular
branch to the company's computer. such as (1)
Resolution: (1)
First, you need to clone a local library using the git clone command.
It will then automatically clone a master branch (which is seemingly necessary).
After that, no one will be cloned from the branch.
Assuming you need a dev (assuming that the branch is already in the remote library, which is what you need to clone) for development, you need to create a dev branch of the remote origin to be developed on the Dev branch and create the local dev branch with this command:
$ git checkout-b dev Origin/dev
Re-sync under:
$ git pull
This enables the Clone Dev branch to be implemented.
————————————————————————————
I am also new git, are novice, welcome to cross-examine. ~\ (≧▽≦)/~
Resolution: (2)
Git clone can clone only the master branch of the remote library and cannot clone all branches, the workaround is as follows:
1. Find a clean directory, assuming it is git_work
2. CD Git_work
3. Git clone http://myrepo.xxx.com/project/.git, so you get a project subdirectory in the Git_work directory
4. CD Project
5. Git branch-a, list all branch names as follows:
Remotes/origin/dev
Remotes/origin/release
6. Git checkout-b dev Origin/dev function is to checkout the remote Dev branch, name the dev branch locally and switch to the local dev branch
7. Git checkout-b release origin/release, action see previous explanation
8. Git checkout dev, switch back to Dev branch and start development.
How git clones all the remote branches