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莫属. 相比同类软件, ...
随机推荐
- TinyFrame系列:基于EFCodeFirst,IOC,AOP的轻型框架
TinyFrame开篇:基于CodeFirst的ORM TinyFrame续篇:整合Spring IOC实现依赖注入 TinyFrame再续篇:整合Spring AOP实现日志拦截 TinyFrame ...
- docfx开源啦
废话不多说了,直接上地址: 源代码: https://github.com/dotnet/docfx 文档: http://dotnet.github.io/docfx/ clone git clon ...
- java中文文档官方下载
一直在寻找它,今天无意之间终于发现它了! http://download.oracle.com/technetwork/java/javase/6/docs/zh/api/overview-summa ...
- [Android]Volley源码分析(四)
上篇中有提到NetworkDispatcher是通过mNetwork(Network类型)来进行网络访问的,现在来看一下关于Network是如何进行网络访问的. Network部分的类图:
- linux配置java开发环境
一.下载jdk java -version 查看有没有安装jdk 下载对应版本的jdk:jdk-java7u60-linux-x64.tar.gz 二.解压 cp jdk-java7u60-lin ...
- Javascript实现前端简单路由
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http ...
- EmguCV(OpenCV)实现高效显示视频(YUV)叠加包括汉字
视频处理中,往往需要在上面增加文字包括汉字英文字母数字标点等,Emgu.CV/opencv 绘图 线面文字包括中文 这篇里也有相关介绍,但是这篇里根据逐像素修改rgb值的方法效率太低 查了很多资料,基 ...
- 在Application中集成Microsoft Translator服务之翻译语言代码
Microsoft Translator支持多种语言,当我们获取服务时使用这些代码来表示我们是使用哪种语言翻译成什么语言,以下是相关语言对应的代码和中文名 为了方便我已经将数据库上传到云盘上,读者可 ...
- css清楚浮动的方法
- APP的消息推送(极光推送)
APP的消息推送,使用的第三方平台是极光推送 简单案例(以Thinkphp为例): 1.下载下载PHPSDK 2.把PHPSDK目录下的jpush-api-php-client-3.5.1\src\J ...