使用git参与团队开发过程中所踩的坑
使用git参与团队开发过程中所踩的坑
***我简述下写作背景吧,由于多次使用 -f 强制推送,被说了。。。***。
##1. Updates were rejected because the tip of your current branch is behind
git pull后,选择直接git push未能成功
报错:分支冲突。
描述:Updates were rejected because the tip of your current branch is behind its remote counterpart.
网上传的git pull origin master git push -u origin master不能解决我的问题。
解决步骤:
- git pull
- git status
(此时报错Unmerged paths: (use “git add …” to mark resolution))
Unmerged paths:
(use “git add …” to mark resolution) - git add . 之后敲击回车
- git commit -m 'xxx’再次提交
- git push
踩坑之后会第一时间更新。