|
本帖最后由 leizhou 于 2017-9-1 19:08 编辑
GIT使用入门
----------------------------------------------------------
git 常用命令
git clone http://...;
git checkout -b topic;
git pull origin master:master;
git merge master;
git status;
git diff;
git checkout src/;
git reset --hard HEAD;
git add..;
git commit -m 'test';
git push origin topic:topic;
git push origin topic:master;
----------------------------------------------------------
git使用流程图
git使用流程图
----------------------------------------------------------
推荐书籍:https://git-scm.com/book/zh/v2
推荐博客《Git详解》:http://blog.jobbole.com/25775/
----------------------------------------------------------
GIT开发规则
1.git push本地topic分支的代码到远程分支前,先合并远程master,即pull master+merge master
2.本地master分支永远跟随远程master分支,禁止改动本地master分支代码
3.先将代码保存在远程私有分支,再合并至远程master分支
4.鼓励commit
git commit -m 'topic分支提交代码'
git checkout master
git pull origin master:master
git checkout topic
git merge master
git push origin topic:topic
git push origin topic:master
----------------------------------------------------------
GIT分支规则:
1、所有代码都合并到master上
2、版本转测时从master上拉出一个转测分支
3、在测试过程中发现的bug在转测分支上修改,并合入到master上
4、版本发布时从转测分支上下载代码打包
5、分支命名规范,根版本号比如本次版本号为 1.0.0_TR2(发布分支),
1.0.0_TR2_B{*} (转测分支名,多次转测的次数)
|
|