操作系统 
首页 > 操作系统 > 浏览文章

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

(编辑:jimmy 日期: 2024/5/20 浏览:3 次 )

今天我们就来讲讲在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怎么设置终端快捷键?

ubuntu18.04系统目录怎么删除?

Ubuntu系统英文怎么改成中文语言?

上一篇:Windows10安装ubuntu16.04双系统教程(图文教程)
下一篇:Windows10安装ubuntu18.04双系统教程的方法步骤(图文)
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网