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. PyCharm3.0默认快捷键(翻译的)

    PyCharm3.0默认快捷键(翻译的) PyCharm Default Keymap 1.编辑(Editing) Ctrl + Space    基本的代码完成(类.方法.属性)Ctrl + Alt ...

  2. ReactNative官方中文文档0.21

    整理了一份ReactNative0.21中文文档,提供给需要的reactnative爱好者.ReactNative0.21中文文档.chm  百度盘下载:ReactNative0.21中文文档 来源: ...

  3. 豪斯课堂K先生全套教程淘宝设计美工第一期+第四期教程(无水印)

    第一期课程包括 <配色如此简单> <配色的流程><对称之美>第二期课程包括 <字体的气质及组合><平衡及构图形式><信息的筛选与图片的 ...

  4. cxf3.x +spring 3.x(4.x)+ maven 发布webservice 服务

    cxf 在做企业级webservices 服务的时候确实非常好用,个人觉得比axis1, 2都好用. 虽然spring自身也提供了webservices发布方法,这里使用cxf跟spring结合,使用 ...

  5. RapidJSON 代码剖析(三):Unicode 的编码与解码

    根据 RFC-7159: 8.1 Character Encoding JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32. The defa ...

  6. 【Python】[进程和线程]多进程,多线程,ThreadLocal,进程VS.线程,分布式进程

    1.多进程,multiprocessing模块,   进程间的通信:Queue[队列],Pipes[管子]2.多线程,    注意:线程公用变量,混乱   解决方法Lock:因为只有一个锁,所以当要执 ...

  7. 【原创】cs+html+js+css模式(六):改造ajax.js,从原来的原生态js修改为依赖于jquery插件

          由于原有的ajax可能在性能上,对于jquery的支持不够并且不够方便,开发人员使用的时候需要知道我们内部指定的后缀文件的设置,基于这个前提我们进行了js的改造 // 使用闭包开发插件 ( ...

  8. 教你一招:解决Win10 win7 删除文件或文件夹时提示“找不到该项目”

    问题很怪异,解决的办法却很简单. 首先,分析问题 使用不可显示ASCII字符或采用UNICODE字符方法创建的文件或文件夹: 名称中含有..等特殊符号文件或文件夹名称不符合Windows命名规范或建立 ...

  9. angular指令深度学习篇

    angular指令深度学习-过滤器 limitTo ... <body ng-app="app" > <div ng-controller="myCtr ...

  10. BZOJ2818 Gcd

    本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000作者博客:http://www.cnblogs.com/ljh2000-jump/转 ...