赞
踩
开发是在本地自己的分支上,提交时将自己本地分支上的内容合并到develop分支上,再提交
git clone -b develop git地址
git checkout -b 自己的本地分支名称
git add .
git commit -m '提交注释信息'
- git checkout develop
- git pull
将自己的分支与远程develop分支合并(禁用Fast Forward模式)
git merge 自己本地分支名称 --no-ff
- git add .
- git commit
git push
补充
- git reset --soft HEAD
- --HEAD 指上一个版本,也可以写成HEAD~1(HEAD~2回退2个commit)
- --soft 不删除工作空间改动代码,撤销commit,不撤销git add .
- --mixed 不删除工作空间改动代码,撤销commit,并且撤销git add . (默认)
- (git reset --mixed HEAD 和 git reset HEAD 效果是一样的)。
- --hard 删除工作空间改动代码,撤销commit,并且撤销git add ,回退版本 取消merge常用
-
git log
git reset --hard commitID #
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。