Git使用
基本功能:git下拉代码和提交代码
基本语法:
- 下拉代码
git clone code_link -b colde_branch - 修改代码
- 提交代码
git add .git commit -m "comments"或者使用TortoiseGit添加备注git push(本地仓)或者git push origin HEAD:refs/for/code_branch(产品分支)
- 其他
1)撤销提交
git reset --soft HEAD^
- 修改备注
git commit --amend - 需要自动生成ChangeID
git config --local --list && curl -ks https://cmc-nkg-artifactory.cmc.tools.huawei.com/artifactory/cmc-software-release/CodeHub/tools/hooks1.0/local.sh | sh -
git commit --amend --no-edit
git reset --soft HEAD^

浙公网安备 33010602011771号