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的更多相关文章

  1. Git Workflow简介

    1. Git WorkFlow介绍 Git Flow是构建在Git之上的一个组织软件开发活动的模型,是在Git之上构建的一项软件开发最佳实践.Git Flow是一套使用Git进行源代码管理时的一套行为 ...

  2. BASIC GIT WORKFLOW

    BASIC GIT WORKFLOW Generalizations You have now been introduced to the fundamental Git workflow. You ...

  3. [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 ...

  4. 图解 git workflow

    图解 git workflow 图解 git 工作流 git-flow https://www.git-tower.com/learn/git/ebook/cn/command-line/advanc ...

  5. git workflow常用命令

    git init git status git add readme.txt git add --all         Adds all new or modified files git comm ...

  6. git workflow 原文 以及缺点

    原文链接 http://nvie.com/posts/a-successful-git-branching-model/ 有人发现git work flow的缺点,历史提交会变得混乱 http://e ...

  7. 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 ...

  8. git 使用入门篇

    最近准备给同事培训git,发现了一个不错的资源,在这里:http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing ...

  9. 梳理git分支管理策略

    如果你严肃对待编程,就必定会使用"版本管理系统"(Version Control System). 眼下最流行的"版本管理系统",非Git莫属. 相比同类软件, ...

随机推荐

  1. IO(二)----字符流

    计算机并不区分二进制文件与文本文件.所有的文件都是以二进制形式来存储的,因此,从本质上说,所有的文件都是二进制文件.所以字符流是建立在字节流之上的,它能够提供字符层次的编码和解码. 常见的码表 ASC ...

  2. bzoj 1334: [Baltic2008]Elect

    Description N个政党要组成一个联合内阁,每个党都有自己的席位数. 现在希望你找出一种方案,你选中的党的席位数要大于总数的一半,并且联合内阁的席位数越多越好. 对于一个联合内阁,如果某个政党 ...

  3. JQUERY获取当前页面的URL信息

    以前在做网站的时候,经常会遇到当前页的分类高亮显示,以便让用户了解当前处于哪个页面.之前一直是在每个不 同页面写方法.工程量大,也不便于修改.一直在想有什么简便的方法实现.后来在网上查到可以用获取当前 ...

  4. knockoutJS学习笔记01:从拼接字符串到编写模板引擎

    开篇 关于knockout的文章,园里已经有很多大神写过了,而且都写得很好.其实knockout学习起来还是很容易的,看看官网的demo和园里的文章,练习练习就可以上手了(仅限使用,不包含研究源码). ...

  5. c#编码转换

    /// <summary> /// URL编码 /// </summary> /// <param name="Source"></par ...

  6. Message启动菜单个性化制作工具V1.0.3.1最终版

    特点及功能 1.可以全新制作Message启动菜单文件!也可以选择修改已存在的菜单文件,制作或预览时会提示以哪个菜单版本为核心启动菜单. 2.支持更换背景图片,也支持图片标准化防止启动时黑屏,在选择背 ...

  7. Eclipse使用快捷键代码格式化有时失效解决办法

    今天写代码的时候发现使用快捷键格式化代码没用了. 首先,先看看自己手动格式化是否还行 右键 - Source - Format 结果:正常! 既然手动正常的话那就可能是这个快捷键的热键被占用了,然后我 ...

  8. Angular双向数据绑定MVVM以及基本模式分析

    MVVM: angular的MVVM实现的是双向数据绑定,模型从服务器端抓取到数据,将数据通过控制器(controller)传递到视图(view)显示,视图数据发生变化时同样也会影响到模型数据的变化, ...

  9. <<< PermGen space溢出解决方法

    错误信息中的PermGen space的全称是Permanent Generation space,是指内存的永久保存区域.还没有弄明白PermGen space是属于非堆内存,还是就是非堆内存,但至 ...

  10. Google Map API V3开发(1)

    Google Map API V3开发(1) Google Map API V3开发(2) Google Map API V3开发(3) Google Map API V3开发(4) Google M ...