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. LCM 轻量级通信组件

    LCM和ZMQ比较 http://www.doc88.com/p-6711552253536.html 基于LCM和ZeroMQ的进程间通信研究 2.简介 LCM(Lightweight Commuc ...

  2. LeetCode:Subsets I II

    求集合的所有子集问题 LeetCode:Subsets Given a set of distinct integers, S, return all possible subsets. Note: ...

  3. C#软件设计——小话设计模式原则之:依赖倒置原则DIP

    前言:很久之前就想动笔总结下关于软件设计的一些原则,或者说是设计模式的一些原则,奈何被各种bootstrap组件所吸引,一直抽不开身.群里面有朋友问博主是否改行做前端了,呵呵,其实博主是想做“全战”, ...

  4. 87 resize2fs-增大或者收缩未加载的“ext2/ext3”文件系统的大小

    resize2fs命令被用来增大或者收缩未加载的"ext2/ext3"文件系统的大小.如果文件系统是处于mount状态下,那么它只能做到扩容,前提条件是内核支持在线resize., ...

  5. Android BLE 蓝牙编程(三)

    上节我们已经可以连接上蓝牙设备了. 本节我们就要获取手环的电池电量和计步啦. 在介绍这个之前我们需要先了解下什么是 服务 什么是 UUID 我们记得上节中我们item监听事件的回调的返回值是Bluet ...

  6. c# Newtonsoft.Json序列化和反序列 js解析

    Newtonsoft.Json下载地址:http://www.newtonsoft.com/products/json/ 参考:      http://www.cnblogs.com/yanweid ...

  7. hdu3087 LCA + 暴力

    Network Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Su ...

  8. Android开发:关于WebView

    原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://liangruijun.blog.51cto.com/3061169/647456 ...

  9. FastJson的简单实用

    一.FastJson的理解 在工作中,经常客服端需要和服务端进行通信,目前很多项目都采用JSON的方式进行数据传输,简单的参数可以通过手动拼接JSON字符串,但如果请求的参数过多,采用手动拼接JSON ...

  10. npm 使用记录

    在 Mint 下安装 pencil,折腾半天,发现它对 firefox 的支持,只到 46.0 .本来打算研究下怎么用 xulrunner 来跑 pencil 这个 web 应用,查看项目资源的时候, ...