Git創(chuàng)建子分支,合并分支并提交
Git合并分支后,需要將子分支提交到git倉庫,這個時候就需要單獨提交子分支,其步驟如下:
1.先創(chuàng)建子分支,并包含最新當(dāng)前分支下的修改數(shù)據(jù)
git checkout -b sonBranch
2.將新分支內(nèi)容全部提交
git add . git commit -m "完成開發(fā)"
3.在碼云創(chuàng)建一個子分支
git push -u origin sonBranch
4.切換到主分支
git checkout master
5.合并分支,更新主分支內(nèi)容
git merge sonBranch
6.重新提交主分支內(nèi)容
git push
PS:下面看下gitee 如何創(chuàng)建倉庫 及發(fā)布
http://pengchenggang.gitee.io/layuisyshelp
-----------
在本地項目文件中使用bash
$ git config --global user.name "你的名字" $ git config --global user.email "你的郵箱"
1. 初始化
$ git init $ git remote add origin https://gitee.com/xxx/xxx.git (你的遠(yuǎn)程項目地址)
2.克隆一下
$ git clone https://****.git (你的遠(yuǎn)程項目地址)
3. 提交
$ git pull origin master $ git add . $ git commit -m "你的第一次提交" $ git push origin master ---------------------
gitee 里面要發(fā)布一個pages的服務(wù),然后就能訪問了
總結(jié)
到此這篇關(guān)于Git創(chuàng)建子分支,合并分支并提交的文章就介紹到這了,更多相關(guān)Git創(chuàng)建子分支內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
php/asp/asp.net中判斷百度移動和PC蜘蛛的實現(xiàn)代碼
這篇文章主要介紹了php/asp/asp.net中判斷百度移動和PC蜘蛛的實現(xiàn)代碼,需要的朋友可以參考下2015-09-09