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

2024-11-24 40阅读 0评论

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

git branch newbh

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

1、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

git branch

就能看到当前有的分支。

2、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

git checkout newbh

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

3、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

git branch

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

4、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

修改一下文件。

git status

git add -A

然后我们添加到暂缓区。

5、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

6、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

git commit -m ""

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

7、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

8、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

git push -u orgin newbh

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

git branch -a

查看全部分支。

9、Ubuntu系统怎么用git新增分支并且提交? - 奥多云

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

文章版权声明:除非注明,否则均为奥多云原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
评论列表 (暂无评论,40人围观)

还没有评论,来说两句吧...

取消
微信二维码
微信二维码
支付宝二维码