今天我们就来讲讲在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创建和提交一个新的分支?的详细内容,更多请关注小闻网其它相关文章!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。