以下的例子中主分支为develop,子分支为automation
1、切换到本地的仓库,更新为最新的代码
在develop分支上执行:
git pull
2、切换到要同步的子分支上
git checkout automation
3、将主分支的代码同步到子分支上
git merge develop
4、在子分支上查看当前的代码状态
git status

5、 将代码添加至暂存区
git add .
6、将暂存区的代码提交至本地的版本库
git commit -m 'xx'
7、git push 将同步后的代码上传至git服务器上托管
git push
1821

被折叠的 条评论
为什么被折叠?



