In everyday project development process, each developing a new feature the best open a new branch operation to modify the code, then the new branch and the main branch after the merger test new features without problems.
First, create a branch
1, you can use git bash command tool
Enter git checkout -b dev create dev branch and switch to the dev branch
2, open the code to create a new cloud-branch management branch dev
In the local directory command tool with git bash
Enter the git pull command to obtain a new branch created on the code cloud
Git checkout dev input switch to the new branch dev
Second, submit code to the new branch
Use git bash command tool in the local directory
Enter the git add. Submit code to a local buffer
Enter git commit "Comment" will be submitted to the local buffer contents to a local warehouse -m
Enter the contents of the local repository git push submitted online warehouse
Third, merging branches
Use git bash command tool in the local directory
Git checkout master input switching back to the main branch
Enter git merge origin / dev merge the new branch
Enter the contents of the new branch git push will be submitted to the main branch