2019-07-17

解決沖突:

git fetch

先把需要更改的復(fù)制一份

git reset --hard 版本號

復(fù)制回去

git pull

檢查

1.git status

2.git fetch

再次提交

3.git add ./

4.git commit -m "

cd ..根目錄執(zhí)行

5.scp -p -P 29418 10227095@gerrit.zte.com.cn:hooks/commit-msg code/.git/hooks/

5.scp -p -P 29418 10227095@gerrit.zte.com.cn:hooks/commit-msg plat/.git/hooks/

5.scp -p -P 29418 10227095@gerrit.zte.com.cn:hooks/commit-msg comm/.git/hooks/

分支目錄執(zhí)行 如CODE

之后使用

6.git commit --amend

7.git log

8.發(fā)起評審

9.+2提交

登陸 http://gerrit.zte.com.cn/#/dashboard/self ?進行+2 submit操作

Git操作

1. 克隆

https://gerrit.zte.com.cn/#/admin/projects/ZXUN-EMSPLUS/code clone代碼 注意不需要新建文件夾

2.切換目錄:cd code

3. 切換分支:git checkout develop

GIT 代碼提交

修改代碼

git pull origin develop

git add -A

git commit -m "內(nèi)容"

cd .. 切換至根目錄

scp -p -P 29418 00256121@gerrit.zte.com.cn:hooks/commit-msg code/.git/hooks/

切換回code

cd -

git push ssh://00256121@gerrit.zte.com.cn:29418/ZXUN-EMSPLUS/code HEAD:refs/for/develop

<pre class="prettyprint linenums brush:bash prettyprinted" style="border-spacing: 0px; font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Helvetica, Arial, sans-serif; background: rgb(252, 252, 252); margin: 10px 0px; padding: 10px; color: rgb(49, 59, 64); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; box-sizing: border-box;">git checkout first
</pre>

代碼提交流程

<pre class="prettyprint linenums brush:bash prettyprinted" style="border-spacing: 0px; font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Helvetica, Arial, sans-serif; background: rgb(252, 252, 252); margin: 10px 0px; padding: 10px; color: rgb(49, 59, 64); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; box-sizing: border-box;">初次提交:

git pull --rebase
git add .
git commit -m "commit message"
git push origin HEAD:refs/for/first

如果該提交沒有通過jenkins任務(wù)檢查或者人工評審,需要修改后再提交時:
......修改文件中......
git pull --rebase
git add .
git commit --amend
git push origin HEAD:refs/for/first
</pre>

EC 處理

編輯>待我處理>雙擊>變更活動 >相關(guān)變更請求>修改(clone代碼 使用vscode 查找并修改)>提交代碼>評審>回應(yīng)EC

自檢修改:

使用moba進入服務(wù)器,打開文件,使用notepad編輯更改,并使用瀏覽器打開網(wǎng)址,打開控制臺,右鍵刷新,選取清空緩存并硬性加載。

點擊查看修改情況。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容