怎么在Ubuntu系统中使用git新增分支并提交

这篇文章给大家介绍怎么在Ubuntu系统中使用git新增分支并提交,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

1、git branch newbh ,我们创建一个新的分支newbh。

怎么在Ubuntu系统中使用git新增分支并提交

2、git branch,就能看到当前有的分支。

怎么在Ubuntu系统中使用git新增分支并提交

3、git checkout newbh,这样我们就能转换到newbh分支。

怎么在Ubuntu系统中使用git新增分支并提交

4、git branch,能用颜色辨认已经切换到这个分支了。

怎么在Ubuntu系统中使用git新增分支并提交

5、修改一下文件。

git status

git add -A

然后我们添加到暂缓区。

怎么在Ubuntu系统中使用git新增分支并提交

怎么在Ubuntu系统中使用git新增分支并提交

6、git commit -m "",然后我们提交一下到本地版本库。

怎么在Ubuntu系统中使用git新增分支并提交

怎么在Ubuntu系统中使用git新增分支并提交

7、git push -u orgin newbh,然后我们就可以提交到远程仓库。git branch -a,查看全部分支。

怎么在Ubuntu系统中使用git新增分支并提交

关于怎么在Ubuntu系统中使用git新增分支并提交就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

怎么在Ubuntu系统中使用git新增分支并提交