怎么配SSH在此不表,直接说实际操作。
一般公司的Git会有多个分支
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git branch
查看当前所在的分支
develop
develop_wcq
master
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git status
显示修改的内容
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git add .
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git status
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git commit -m "withdraw"
提交到本地git,并把提交的代码标注为“withdraw”
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git status
再看一眼是否提交完了
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git checkout develop
切换到develop分支
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git pull origin develop
把develop的代码拉下来,检查冲突,并改冲突
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git checkout develop_wcq
再跳到自己的分支
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git merge develop
覆盖本地的develop分支
wangchengqiandeMacBook-Pro:lottery-seller wcq$ git push origin develop_wcq
传到远程的自己的分支
网友评论