Home > Article > System Tutorial > How to create and commit a new branch using git in Ubuntu system?
Today we will talk about how to use git to add a branch and submit it in Ubuntu. It is very simple. Please see the detailed introduction below.
1, git branch newbh , we create a new branch newbh.
2, git branch, you can see the current branches.
3, git checkout newbh, so that we can convert to the newbh branch.
4, git branch, you can use the color to identify that you have switched to this branch.
5. Modify the file.
git status
git add -A
Then we add it to the buffer area.
6, git commit -m "", Then we submit it to the local repository.
7, git push -u orgin newbh, then we can submit to the remote warehouse. git branch -a,View all branches.
The above is the detailed content of How to create and commit a new branch using git in Ubuntu system?. For more information, please follow other related articles on the PHP Chinese website!