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

    EventToCommand 在WPF中,并不是所有控件都有Command,例如TextBox,那么当文本改变,我们需要处理一些逻辑,这些逻辑在ViewModel 中,没有Command如何绑定呢?这 ...

  2. 使用MEF实现通用参数设置

    通用后台管理系统必备功能模块包含日志管理,权限管理,数据字典,参数配置等功能.参数设置主要用于设置系统运行所需的一些基础性配置项,比如redis缓存,mq消息队列,系统版本等信息.好的参数设置需要达到 ...

  3. jsonp 跨域请求

    背景: JavaScript是一种在Web开发中经常使用的前端动态脚本技术.在JavaScript中,有一个很重要的安全性限制,被称为"Same-Origin Policy"(同源 ...

  4. 在哪可以Sigmaplot 13下载免费版的

    SigmaPlot是一款科学的数据分析和绘图软件,可以进行精密绘图.数据分析.自动化管理数据和创建网络图表,具备制作和发行品质图表的水平,该软件被广泛地运用在多个领域.现今SigmaPlot软件日益受 ...

  5. 防DDOS攻击SHELL脚本

    最近一段时间服务器频繁遭到DDOS攻击,目前只能通过封IP来源来暂时解决.IP不源变化多端,光靠手工来添加简直是恶梦,想了个方法,用SHELL来做. 比较简单,但很实用:) 以下内容根据作者原文进行适 ...

  6. python更新后yum问题

    How to switch between Python versions on Fedora Linux Currently, the default python version on Fedor ...

  7. bzoj 2756奇怪的游戏

    2756: [SCOI2012]奇怪的游戏 Time Limit: 40 Sec  Memory Limit: 128 MB Description Blinke 最近喜欢上一个奇怪的游戏. 这个游戏 ...

  8. BZOJ 4568 幸运数字

    题目传送门 4568: [Scoi2016]幸运数字 Time Limit: 60 Sec Memory Limit: 256 MB Description A 国共有 n 座城市,这些城市由 n-1 ...

  9. HTML案例—很讨巧的一种js+css制作hover模式展示二级菜单方法

    <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>利 ...

  10. 分析DH加密算法,一种适基于密钥一致协议的加密算法。

    DH Diffie-Hellman算法(D-H算法),密钥一致协议.是由公开密钥密码体制的奠基人Diffie和Hellman所提出的一种思想.简单的说就是允许两名用户在公开媒体上交换信息以生成&quo ...