服务器之家:专注于服务器技术及软件下载分享
分类导航

Linux|Centos|Ubuntu|系统进程|Fedora|注册表|Bios|Solaris|Windows7|Windows10|

服务器之家 - 服务器系统 - Ubuntu - Ubuntu系统怎么用git新增分支并且提交?

Ubuntu系统怎么用git新增分支并且提交?

2020-06-05 22:08燃烧的猛男1 Ubuntu

Ubuntu系统怎么用git新增分支并且提交?Ubuntu中想要使用git新增分支并且提交,该怎么常见一个新的分支呢?下面我们就来看看详细的教程,需要的朋友可以参考下

今天我们就来讲讲在Ubuntu里用git新增分支并且提交的方法,很简单,请看下文详细介绍。

git branch newbh

我们创建一个新的分支newbh。

Ubuntu系统怎么用git新增分支并且提交?

git branch

就能看到当前有的分支。

Ubuntu系统怎么用git新增分支并且提交?

git checkout newbh

这样我们就能转换到newbh分支。

Ubuntu系统怎么用git新增分支并且提交?

git branch

能用颜色辨认已经切换到这个分支了。

Ubuntu系统怎么用git新增分支并且提交?

修改一下文件。

git status

git add -A

然后我们添加到暂缓区。

Ubuntu系统怎么用git新增分支并且提交?

Ubuntu系统怎么用git新增分支并且提交?

git commit -m ""

然后我们提交一下到本地版本库。

Ubuntu系统怎么用git新增分支并且提交?

Ubuntu系统怎么用git新增分支并且提交?

git push -u orgin newbh

然后我们就可以提交到远程仓库。

git branch -a

查看全部分支。

Ubuntu系统怎么用git新增分支并且提交?

以上就是Ubuntu系统用git新增分支并且提交的方法,希望大家喜欢,请继续关注服务器之家。

延伸 · 阅读

精彩推荐