赞
踩
- master //主线分支
- 在repo中,基于master拉取个人分支br_modify
- git clone xxxxx // git clone不加分支,默认是master分支
- git checkout br_modify // 切换到个人分支br_modify
- /*********************
- 本地修改
- xxx
- yyy
- **********************/
- git status // 查看当前状态,哪些文件有改动等等
- git add xxx yyy
- git commit -m "Add xxx, yyy" // 将修改提交到git缓冲区
- git push // 将修改push到repo中的br_modify分支
在repo中提MR(Merge Require)
找commiter merge MR
- /* 当前本地还是br_modify分支 */
- git fetch origin // 同步所有git管理的内容
- git merge origin/master // 将master分支同步到br_modify
- /**********************
- 本地修改
- ***********************/
-
- git status // 查看当前状态,哪些文件有改动等等
- git add
- git commit
- git push
- git checkout -b br_xxx // create local branch
- git checkout -- <xxx> // 放弃对xxx文件的本地修改
- git reset --soft <yyy> // 回退修改大yyy commit-id所在节点(只回退git记录,不回退本地修改)
- git reset --hard <yyy> // 回退修改大yyy commit-id所在节点(回退git记录和本地修改)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。