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莫属. 相比同类软件, ...
随机推荐
- google-analytics的使用: 解析页面引入代码
代码整理和注释 // 创建ga()方法, 加载analytics.js文件 // a, m 作为形参,确保下面的执行不会修改外部的同名变量 (function(win, doc, o, g, ga, ...
- jquery取<input>的readOnly属性,O要大写
今天在jquery中取input的readonly属性时,发现 我这样写$(“#input”).readonly取这个属性时,总是undefined,后来一想,难道html中的属性only没有大写,是 ...
- C#软件设计——小话设计模式原则之:单一职责原则SRP
前言:上篇C#软件设计——小话设计模式原则之:依赖倒置原则DIP简单介绍了下依赖倒置的由来以及使用,中间插了两篇WebApi的文章,这篇还是回归正题,继续来写写设计模式另一个重要的原则:单一职责原则. ...
- .NET跨平台之旅:将示例站点从ASP.NET 5 Beta5升级至Beta7
9月2日,微软发布了ASP.NET 5 Beta7(详见Announcing Availability of ASP.NET 5 Beta7).其中最大的亮点是dnx已经可以完全基于CoreCLR运行 ...
- fiddler手机抓包教程
序言 记录一下自己第一次使用fiddler抓取手机的信息,做一个备忘 实现步骤 一.首先设置一下fiddler,使其对HTTPS协议进行抓包 二.然后设置fidder使得fiddler支持远程计算机连 ...
- html盒子模型
http://www.cnblogs.com/sunyunh/archive/2012/09/01/2666841.html
- jQuery之Ajax--底层接口
1. $.ajax()方法:是jQuery最底层的Ajax实现.它的结构为:$.ajax(options).该方法只有一个参数,但在这个对象里面包含了$.ajax()方法所需要的请求设置以及回调函数等 ...
- ansible的SSH连接问题
问题描述: 在ansible安装完毕后一般需要以SSH的方式连接到需要进行管理的目标主机,一开始遇到了如下问题: # ansible -m ping all 10.200.xx.xx | UNREAC ...
- Windows7SP1补丁包(Win7补丁汇总) 32位/64位版 更新截至2016年11月
Windows7SP1(64位)补丁包(Win7补丁汇总)更新到本月最新.包含Windows7SP1中文版所有重要补丁,可离线安装,适用于Windows 7 SP1 64位 简体中文系统.包含Inte ...
- ckeditor+angularjs directive
var cmsPlus = angular.module('cmsPlus', []); cmsPlus.directive('ckEditor', function() { return { req ...