2019-07-17

解决冲突:

git fetch

先把需要更改的复制一份

git reset --hard 版本号

复制回去

git pull

检查

1.git status

2.git fetch

再次提交

3.git add ./

4.git commit -m "

cd ..根目录执行

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/

分支目录执行 如CODE

之后使用

6.git commit --amend

7.git log

8.发起评审

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 "内容"

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任务检查或者人工评审,需要修改后再提交时:
......修改文件中......
git pull --rebase
git add .
git commit --amend
git push origin HEAD:refs/for/first
</pre>

EC 处理

编辑>待我处理>双击>变更活动 >相关变更请求>修改(clone代码 使用vscode 查找并修改)>提交代码>评审>回应EC

自检修改:

使用moba进入服务器,打开文件,使用notepad编辑更改,并使用浏览器打开网址,打开控制台,右键刷新,选取清空缓存并硬性加载。

点击查看修改情况。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容