The command is as follows:
1: Locally created branch dev
[Email protected]/d/home/myself/symfony (master) $ git branch dev
2: The following is the submission of the local branch to the remote repository
[Email protected]/d/home/myself/symfony (master) $ Git push origin devtotal 0 (Delta 0), reused 0 (Delta 0) to [email prote Cted]:turingtd/symfony.git * [New branch] Dev-Dev
3: Check out a few branches of the remote repository
[Email protected]/d/home/myself/symfony (master) $ git branch-a dev* Master * Number represents your current branch Remotes/origin/head- > Origin/master remotes/origin/dev remote repository Dev branch remotes/origin/master remote Repository Master Branch
This blog post is quite comprehensive: recommend http://blog.csdn.net/arkblue/article/details/9568249/
Git locally creates a branch three-step approach to a remote repository