Git 关于Fast Forward提交的简单说明
多人协同开发,使用Git经常会看到警告信息包含术语:fast forward, 这是何义?
简单来说就是提交到远程中心仓库的代码必须是按照时间顺序的。
比如A从中心仓库拿到代码后,对文件f进行了修改。然后push到中心仓库。
B在A之前就拿到了中心仓库的代码,在A push成功之后也对f文件进行了修改。这个时候B也运行push命令推送代码。
会收到一个类似下面的信息:fast-forwards' section of 'git push --help' for details.
chenshu@sloop2:~/work/189/appengine$ git push
To ssh://csfreebird@10.112.18.189:29418/appengine.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://csfreebird@10.112.18.189:29418/appengine.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
提醒你非快进方式的更新被拒绝了,需要先从中心仓库pull到最新版本,merge后再push.
fast forward能够保证不会强制覆盖别人的代码,确保了多人协同开发。尽量不要使用non fast forward方法提交代码。
Git 关于Fast Forward提交的简单说明的更多相关文章
- Git的fast forward和no fast forward和 three way merge 以及squash(聚合)
github上上传了版本库https://github.com/ChuckGitMerge 包括merge和rebase 没时间画图,貌似也不太会用画图工具,先写了一个文字版本的 更新:2015年 ...
- 【Todo】git的fast forward & git命令学习 & no-ff
git的fast-forward在之前的文章有介绍过,但是介绍的不细: http://www.cnblogs.com/charlesblc/p/5953066.html fast-forward方式就 ...
- Git – Fast Forward 和 no fast foward
Git 很是强大,在体验过rebase的华丽之后,再次发现之前在TFS上遇到的问题一下都有解了.但也印证了Git深入并非易事.这篇就谈下一个容易迷糊的概念:Fast forward. Fast-For ...
- Git:非Fast forward下的合并(--no-ff方式的git merge)
创建dev分支,并且修改readme.txt的内容,然后提交 使用git merge --no-ff -m "说明内容" 分支名称合并分支 使用git log --graph -- ...
- git教程5-查看关系图与no fast forward融合
1.每一个提交相当于一个版本,版本都有版本号与之对应.通常通过git commit -m "name"为每次提交命名. 2.融合:即将次分支的最后一个版本添加到主分支上.当融合冲突 ...
- Git 分支管理 不使用Fast forward模式进行合并 分支管理策略
通常,合并分支时,如果可能,Git会用Fast forward模式,但这种模式下,删除分支后,会丢掉分支信息. 如果要强制禁用Fast forward模式,Git就会在merge时生成一个新的comm ...
- mzy git学习,禁用Fast forward的普通合并(六)
git merge --no-ff -m "msg" x-branch:禁用Fast forward的普通合并 通常,合并分支时,如果可能,Git会用Fast forward模式, ...
- Git分支(2/5) -- Fast Forward 合并
快捷操作: 切换并创建分支: git checkout -b 分支名. git checkout -b some-change 然后我打开某个文件(index.html)修改一下标题. Commit之 ...
- Git Fast Forward 和 no fast foward
如果执行了 Fast Forward,开发者根本不会看到这个分支,就像在 master 直接 commit 一样.
随机推荐
- SharePoint创建web应用程序,提示密码不正确
使用版本SharePoint2010: $username="domain\username"$newpassword="xxxxxxxx"stsadm -o ...
- tracert显示为超时
1.那一跳禁PING2.那一跳不对TTL超时做响应处理,直接丢弃3.MPLS VPN网络
- Echarts 折线类型
1:Echarts2.0 这种皮肤下柱状图转折线图默认是平滑曲线 默认皮肤为硬折线: 如果需要在2.0的macarons皮肤下使用硬折线需显式设置以下属性: series: [ { ...
- Go的学习 append的使用
1. package main; import "fmt" func test () { ],,,,}; s:=a[:] fmt.Printf(]) s=append(s,); s ...
- Maven项目的pom.xml配置文件格式初识
Maven项目 有pom.xml文件的项目就已经是一个maven项目了,但是还没有被maven托管,我们需要将该项目添加为maven项目 <project xmlns="http:// ...
- sql 2008查看进程情况和对应语句,检查死锁进程
---------------------------------进程情况1----------------------- --得到SPID if object_id('tempdb..#info') ...
- hdu 1007 Quoit Design (经典分治 求最近点对)
Problem Description Have you ever played quoit in a playground? Quoit is a game in which flat rings ...
- 【HDU5306】【DTOJ2481】Gorgeous Sequence【线段树】
题目大意:给你一个序列a,你有三个操作,0: x y t将a[x,y]和t取min:1:x y求a[x,y]的最大值:2:x y求a[x,y]的sum 题解:首先很明显就是线段树裸题,那么考虑如何维护 ...
- Visual Studio Code 做PHP开发
Visual Studio Code 做PHP开发 1. 在Windows 10环境下安装PHP: 1. 下载自己中意的PHP版本:http://windows.php.net/download (我 ...
- zkw 线段树
优秀的 zkw 线段树讲解:<线段树的扩展之浅谈 zkw 线段树> 存一份模板代码(区间修改.区间查询): /* zkw Segment Tree * Au: GG */ #include ...