团队协作git操作流程
克隆一个全新的项目,完成新功能并且提交:git clone XXX //克隆代码库git checkout -b test //新建分支modify some files //完成修改git add . //把修改加入stage中git commit -m '' //提交修改到test分支review代码git checkout master //切换到maste...
·
- 克隆一个全新的项目,完成新功能并且提交:
- git clone XXX //克隆代码库
- git checkout -b test //新建分支
- modify some files //完成修改
- git add . //把修改加入stage中
- git commit -m '' //提交修改到test分支
- review代码
- git checkout master //切换到master分支
- git pull //更新代码
- git checkout test //切换到test分支
- git meger master //把master分支的代码merge到test分支
- git push origin 分支名//把test分支的代码push到远程库
- 目前正在test分支上面开发某个功能,但是没有完成。突然一个紧急的bug需要处理
- git add .
- git stash
- git checkout bugFixBranch
- git pull --rebase origin master
- fix the bug
- git add .
- git commit -m ''
- git push
- git checkout test
- git stash pop
- continue new feature's development
- git工作流
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献1条内容
所有评论(0)