GIT使用规范
来源:互联网 发布:西安交通大学网络导航 编辑:程序博客网 时间:2024/06/06 04:12
GIT使用规范
相关资料
gitlab
gitflow 工作流
git简易指南 http://www.ruanyifeng.com/blog/2012/07/git.html
git分支管理策略 http://rogerdudler.github.io/git-guide/index.zh.html
gitflow 工作流
点击这里查看gitflow图 http://nvie.com/img/git-model@2x.png
分支
- master 固定分支 (生产分支,tag做版本号)
- develop 固定分支 (开发分支,上线前合并代码,code review)
- feature 临时分支 (功能分支,每个项目一个分支)
- release 临时分支 (预发布分支)
- fixbug 临时分支 (修复BUG分支)
创建分支
git checkout -b feature-x develop
切换分支
git checkout feature-x
推送分支
git push origin feature-x
合并分支
git checkout developgit merge --no-ff feature-x
注意: 合并分支一定要加上 --no-ff
命令
删除分支
git branch -d feature-xgit push origin :feature-x
给master打TAG
git checkout mastergit tag -a 1.2
合并与冲突
合并
//切换到合并分支git checkout develop//合并目标分支 --no-ffgit merge --no-ff feature-x
冲突
撒销一个合并
//撤销一个本地的提交git reset --hard HEAD//撤销一个远程的提交 git reset --hard ORIG_HEAD
0 0
- Git使用规范
- GIT使用规范
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- Git 使用规范流程
- ASP.NET MVC 3 Razor 视图引擎 基本语法
- 记录
- Kinect V2 开发专题(1)软硬件需求与安装测试
- Android的socket编程注意点
- The difference between github and svn
- GIT使用规范
- android之service简介
- 几款开源分词地址
- find -exec 与 xargs的区别与使用
- Java从网络中请求获取JSon数据以及解析JSON数据----(自创,请注明)
- UICollectionViewFlowLayout 和collectionView的api的一些解释
- Java 中synchronized的理解
- 动态树||树链剖分(BZOJ1036)
- 四元数的表示