协同工作
创建分支git checkout -b feature/login_api本地分支推送到远程1、git push origin feature/login_api或2、git push origin feature/login_api:git push origin feature/login_api创建远程仓库Floral【本地远程名为origin】, A同事本地创建分支brach1,B同事本地创建分支branch2,A同事想要将branch1下的代码与branch2的代码合并git checkout branch2git merge origin branch1提示文件合并冲突本地修改文件冲突部分git pull origin branch2git add -Agit commit -m "merge"git push origin branch2git branch -d branch1/git branch -D branch1 # 删除本地分支branch1git push origin :branch1 # 删除远程分支branch1git branch 查看本地分支git branch -a 查看本地和远程全部分支四、合并远程分支git push origin branch1 推送代码到远程分支branch1git checkout developgit merge origin branch1git pull origin develop修改冲突git add -Agit commit -m "merge" git push origin developgit branch -d branch1/git branch -D branch1 # 删除分支1git push origin :branch1 # 删除远程分支1git branch -a # 查看远程所有分支复制代码
未完待续