git workflow
1) fork map-matcher.git repo
2) add ssh-keygen public key to gitlab
3) clone repo
git clone git@git.xiaojukeji.com:kezunlin/map-matcher.git
4) create branch proj2dist and add new files
git checkout -b branch-proj2dist
git add 1.txt
git commit -m "add 1.txt"
5) push branch to remote branch
git remote
# origin
git push origin branch-proj2dist:branch-proj2dist
6) update branch files
git add 2.txt
git commit -m "add 2.txt"
git push origin branch-proj2dist:branch-proj2dist
#config
git config --global user.name "Bob"
git config --global user.email "bob@example.com"
git config --global color.status auto
git config --global color.branch auto
git config --list
#list log
git log -5
git log --pretty=oneline --abbrev-commit
#list local branch
git branch
# list remote branch
git branch -r
# create new branch
git checkout -b new-branch origin/master
#update local branch from remote branch
git pull origin remote-branch:local-branch
#update remote branch from local branch
git push origin local-branch:remote-branch
#delete remote branch
git checkout xxx
git push origin :branch-test
git push origin --delete branch-test
#delete local branch
#for not merged branch
git checkout master
git branch -D branch-test
#for merged branch
git branch -d branch-test
error: Cannot delete the branch 'branch-test' which you are currently on.
git checkout master
git branch -d branch-test
#merge branch test1 into master
git checkout master
git merge -m "merge test1 into master" test1
# tags
git tag -a v0.1 -m "version 0.1"
git tag -l
#push tag
git push origin refs/tags/v0.1
git pull origin refs/tags/v0.1
#push/fetch all tags
git push --tags
git fetch --tags
#delete local tag
git tag -d v0.1
#delete remote tag
git push origin :refs/tags/v0.1
git push origin --delete refs/tags/v0.1
git ls-remote --heads --tags origin
git workflow的更多相关文章
- Git Workflow简介
1. Git WorkFlow介绍 Git Flow是构建在Git之上的一个组织软件开发活动的模型,是在Git之上构建的一项软件开发最佳实践.Git Flow是一套使用Git进行源代码管理时的一套行为 ...
- BASIC GIT WORKFLOW
BASIC GIT WORKFLOW Generalizations You have now been introduced to the fundamental Git workflow. You ...
- [Git] An efficient GIT workflow for mid/long term projects
reference : http://fle.github.io/an-efficient-git-workflow-for-midlong-term-projects.html Our full-w ...
- 图解 git workflow
图解 git workflow 图解 git 工作流 git-flow https://www.git-tower.com/learn/git/ebook/cn/command-line/advanc ...
- git workflow常用命令
git init git status git add readme.txt git add --all Adds all new or modified files git comm ...
- git workflow 原文 以及缺点
原文链接 http://nvie.com/posts/a-successful-git-branching-model/ 有人发现git work flow的缺点,历史提交会变得混乱 http://e ...
- Using git-flow to automate your git branching workflow
Using git-flow to automate your git branching workflow Vincent Driessen’s branching model is a git b ...
- git 使用入门篇
最近准备给同事培训git,发现了一个不错的资源,在这里:http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing ...
- 梳理git分支管理策略
如果你严肃对待编程,就必定会使用"版本管理系统"(Version Control System). 眼下最流行的"版本管理系统",非Git莫属. 相比同类软件, ...
随机推荐
- Webpack学习笔记一:What is webpack
#,Loaders干嘛的,webpack can only process JavaScript natively, but loaders are used to transform other ...
- .NET跨平台之旅:将示例站点从ASP.NET 5 Beta7升级至RC1
今天,我们将示例站点(about.cnblogs.com,服务器操作系统是Ubuntu)从ASP.NET 5 Beta7升级到了RC1,在升级过程中只遇到了一个问题. 在运行 dnvm upgrade ...
- 《JavaScript高级程序设计》 - 读书笔记 - 第5章 引用类型
5.1 Object 类型 对象是引用类型的实例.引用类型是一种数据结构,用于将数据和功能组织在一起. 新对象是使用new操作符后跟一个构造函数来创建的.构造函数本身就是一个函数,只不过该函数是出于创 ...
- jquery版楼层滚动特效
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>楼 ...
- 基于CentOS-7.2.15的Mono+jexus镜像
公司开发及测试的linux环境为CentOS-7.X,因此以CentOS-7.2.15作为基础镜像,镜像尺寸确实比较大,最终Mono-4.6.0.125+Jexus-5.8.1.10镜像尺寸已将近1G ...
- Python笔记(4)类__属性与描述符
部分参考自:http://www.geekfan.net/7862/ 新式类与经典类 2和3不一样,3都是新式类. 新式类和经典类的区别: class A: #classic class " ...
- VS2010 MFC对Excel的操作
这是帮别人做项目遇到的一个问题,的那个是纠结了老长时间,本以为是一件很轻松的事... 首先,这里采用了OLE来对Excel进行操作,网上其实有大把的例子,虽然都可以运行,但是并不能满足项目要求,其实我 ...
- [转]数据恢复 文件恢复工具 DiskGenius v4.9.1 绿色专业版及单文件
必备神软!数据恢复及磁盘分区利器DiskGenius,目前最新版为v4.9.1,现在又有新思路的已注册专业版,已亲测可成功恢复4G以上的大文件,但不能虚拟磁盘格式转换!想用新版功能的有福了,推荐使用! ...
- js 时间戳转换成几分钟前,几小时前,几天前
formatMsgTime (timespan) { var dateTime = new Date(timespan); var year = dateTime.getFullYear(); var ...
- RabbitMQ consumer的一些坑
坑 坑就像是恶梦,总是在最不设防的时候出现,打的你满地找牙.这里记录一些坑,遇到的朋友可以及时的跳出,避免带来损失. 使用事件方式去获取queue中的消息,然后再进行处理.这看起来没什么问题,但是如果 ...