Home > System Tutorial > LINUX > body text

How to create and commit a new branch using git in Ubuntu system?

WBOY
Release: 2023-12-29 17:50:02
forward
665 people have browsed it

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.

How to create and commit a new branch using git in Ubuntu system?

2, git branch, you can see the current branches.

How to create and commit a new branch using git in Ubuntu system?

3, git checkout newbh, so that we can convert to the newbh branch.

How to create and commit a new branch using git in Ubuntu system?

4, git branch, you can use the color to identify that you have switched to this branch.

How to create and commit a new branch using git in Ubuntu system?

5. Modify the file.

git status

git add -A

Then we add it to the buffer area.

How to create and commit a new branch using git in Ubuntu system?

How to create and commit a new branch using git in Ubuntu system?

6, git commit -m "", Then we submit it to the local repository.

How to create and commit a new branch using git in Ubuntu system?

How to create and commit a new branch using git in Ubuntu system?

7, git push -u orgin newbh, then we can submit to the remote warehouse. git branch -a,View all branches.

How to create and commit a new branch using git in Ubuntu system?

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!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template