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莫属. 相比同类软件, ...
随机推荐
- ES5基础之正则表达式01:初次见面
1.正则初次见面 测试地址:https://regexper.com 第一个正则:匹配 2006-10-11 或 2006/10/11 var reg = /^\d{4}[-/]\d{2}[-/]\d ...
- 利用日期、经纬度求日出日落时间 C语言程序代码(zz)
先贴在这了,后面应该用得着 http://zhidao.baidu.com/link?url=iw-hcd_tLpRtf4r2Kh-NmDPaQ10UdlunBQUWaz14J-eNEq5fw-y83 ...
- HTML编写需要注意的事项
HTML在编写过程中需要注意许多关键的事项,就如最近我在学习中遇到的问题如下: 代码规范问题: 在代码视图中编写代码,一定要规范的格式,不要把代码全部都写到一块,这样不仅影响效率,更加影响视觉,当出现 ...
- AutoHotKey实现将站点添加到IE的Intranet本地站点
最近在内部推行CRM系统,其中的CPQ组件要求必须将站点加入到"本地Intranet”才可以正常使用,但是由于使用用户比较多(超过几千人),并且每个用户的计算机水平都不一样,所以让用户手工去 ...
- php中关于引用(&)详解
php中关于引用(&)详解 php的引用(就是在变量或者函数.对象等前面加上&符号) 在PHP 中引用的意思是:不同的变量名访问同一个变量内容. 与C语言中的指针是有差别的.C语言中的 ...
- Java面试题总结(二)
43.Java中的两种异常类型是什么?他们有什么区别? Java中有两种异常:受检查的(checked)异常和不受检查的(unchecked)异常.不受检查的异常不需要在方法或者是构造函数上声明,就算 ...
- 数据结构图文解析之:AVL树详解及C++模板实现
0. 数据结构图文解析系列 数据结构系列文章 数据结构图文解析之:数组.单链表.双链表介绍及C++模板实现 数据结构图文解析之:栈的简介及C++模板实现 数据结构图文解析之:队列详解与C++模板实现 ...
- eclipse关闭编译时不必要的校验
- 增量关联规则挖掘—FUP算法
一.背景介绍 关联规则( Association rule)概念最初由Agrawal提出,是数据挖掘的一个重要研究领域, 其目的是发现数据集中有用的频繁模式. 静态关联规则挖掘,是在固定数据集和支持度 ...
- 通过jquery的serializearray处理表单数据成json格式,并提交到后台处理
var params = $("#myform").serializeArray(); var values = {}; for (var item in params) { va ...