同步master主分支,覆盖xxx分支
1. 切换至master主分支
git checkout master
2. 将最新的master代码拉取到本地
git pull
3. 切换至需被覆盖的xxx分支
git checkout xxx
4. 将master合并到xxx分支
git merge master
5. 将合并后的xxx分支代码提交,并推送至xxx分支的远程仓库
合并后也可以等本地开发完成后再提交和push。
git add .
git commit -m "Overwrite the master to the branch"
git push origin xxx

浙公网安备 33010602011771号