【初始化】
git config --global user.name “P13”git config --global user.email “公司邮箱”本地新建[文件夹]作为代码目录cd [文件夹]git clone [项目git地址] git clone -b [branch name] [项目git地址]cd [项目]git branch //查看分支git branch [branch name] //创建分支git checkout [branch name] //切换分支 【常规操作】git branch //查看分支git merge [other_branch] //合并到当前分支git fetch //从远程库取回更新git pull //从远程库取回更新并合并git add //从修改变为暂存git commit //从暂存变为提交git push //提交至远程库 【old】git checkout [branch name] //切换到develop分支git pull //从远程库取回更新并合并 远程develop代码更新到本地developgit checkout [branch name] //切换到本地分支git merge [branch name] //git merge develop 本地develop代码更新到本地分支 【总结:先更新,再提交代码】git pull origin [branch name]git statusgit push origin [branch name]