玉文装饰喷漆各式窗边檐线栏杆 發表於 2019-6-13 12:15:55

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

<p>今天我们就来讲讲在Ubuntu里用git新增分支并且提交的方法,很简单,请看下文详细介绍。</p>
<p>1、<span style="color: #ff0000"><strong>git branch newbh </strong></span>,我们创建一个<strong>新的分支newbh。</strong></p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120246148.jpg" /></p>
<p>2、<span style="color: #ff0000"><strong>git branch</strong></span>,就能看到当前有的分支。</p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120246149.jpg" /></p>
<p>3、<span style="color: #ff0000"><strong>git checkout newbh</strong></span>,这样我们就能转换到<strong>newbh分支。</strong></p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120246150.jpg" /></p>
<p>4、<span style="color: #ff0000"><strong>git branch</strong></span>,能用颜色辨认已经切换到这个分支了。</p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120246151.jpg" /></p>
<p>5、修改一下文件。</p>
<p><span style="color: #ff0000"><strong>git status</strong></span></p>
<p><span style="color: #ff0000"><strong>git add -A</strong></span></p>
<p>然后我们添加到暂缓区。</p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120247152.jpg" /></p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120247153.jpg" /></p>
<p>6、<strong>git commit -m &quot;&quot;,</strong>然后我们提交一下到本地版本库。</p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120247154.jpg" /></p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120247155.jpg" /></p>
<p>7、<strong>git push -u orgin newbh</strong>,然后我们就可以提交到远程仓库。<strong>git branch -a,</strong>查看全部分支。</p>
<p align="center"><img alt="" src="https://img.jbzj.com/file_images/article/201906/20190613120248156.jpg" /></p>
<p>以上就是Ubuntu系统用git新增分支并且提交的方法,希望大家喜欢,请继续关注琼殿技术社区。</p>
<p><strong>相关推荐:</strong></p>
<p><a target="_blank" href="https://www.jb51.net/os/Ubuntu/677013.html">Ubuntu怎么设置终端快捷键?</a></p>
<p><a target="_blank" href="https://www.jb51.net/os/Ubuntu/662163.html">ubuntu18.04系统目录怎么删除?</a></p>
<p><a target="_blank" href="https://www.jb51.net/os/Ubuntu/657328.html">Ubuntu系统英文怎么改成中文语言?</a></p>
頁: [1]
查看完整版本: Ubuntu系统怎么用git新增分支并且提交?