git 的 pull、fetch、merge
1.pull = fetch + merge

In the simplest terms, git pull does a git fetch followed by a git merge.
You can do a git fetch at any time to update your remote-tracking branches under refs/remotes/<remote>/. This operation never
changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. I have even heard
of people running git fetch periodically in a cron job in the background (although I wouldn't recommend doing this).
A git pull is what you would do to bring a local branch up-to-date with its remote version, while also updating your other
remote-tracking branches.
2. merge VS rebase

2.1、merge命令
把origin分支上的修改拉下来并且和你的修改合并;产生一个合并的提交(merge commit):
2.2、rebase命令
把你的分支里的每个提交(commit)取消掉,并且把它们临时保存为补丁(patch)(.git/rebase目录),然后把你的分支更新到最新的origin分支,
最后把保存的这些补丁应用到你的分支上。在rebase的过程中,也许会出现冲突(conflict),Git会停止rebase并会让你去解决 冲突;在解决完冲突后,
用"git-add"命令去更新这些内容的索引(index), 然后,你无需执行 git-commit,只要执行:
$ git rebase --continue
这样git会继续应用(apply)余下的补丁。在任何时候,你可以用--abort参数来终止rebase的行动,你的分支会回到rebase开始前的状态。
$ git rebase --abort
3. git merge VS git merge --no-ff
git merge 在没有冲突的时候不会生成新的commit。
如果想在没有冲突的情况下也自动生成一个commit,记录此次合并就可以用:git merge --no-ff命令。

git 的 pull、fetch、merge的更多相关文章
- Git之pull,fetch差别
简言之, pull=fetch+merge,下拉远程分支并与本地分支合并. fetch只是下拉远程分支,怎么合并,可以自己再做选择. 进一步了解是,git本地有暂存区(亦称为Index区) fetch ...
- [eclipse中使用Git插件] 008 - git操作pull、merge、stash、commit
写在前面: 看标题其实还有001-007之类,本来准备写详细的类似教程一样的东东,但是懒了且时间有限(以后或许会补吧),所以跳到008,录下主要的操作. 所以本随笔的重点就是[pull+merge+s ...
- Git CMD - pull: Fetch from and integrate with another repository or a local branch
命令格式 git pull [options] [<repository> [<refspec>…]] 命令参数 -q, --quiet 安静模式. -v, --verbos ...
- git fetch, merge, pull, push需要注意的地方(转)
在git操作中,我们经常会用到fetch, merge, pull和push等命令,以下是一些我们需要注意的地方. 给大家准备了参考资料: 1. Whatʼs a Fast Forward Merge ...
- git fetch, merge, pull, push需要注意的地方
在git操作中,我们经常会用到fetch, merge, pull和push等命令,以下是一些我们需要注意的地方. 给大家准备了参考资料: 1. Whatʼs a Fast Forward Merge ...
- 第27月第24天 git pull fetch
1. 在进行 pull 操作的同时,其实就是 fetch+merge 的一个过程.我们从 remote 分支中拉取新的更新,然后再合并到本地分支中去. 如果 remote 分支超前于本地分支,并且本地 ...
- git无法pull仓库refusing to merge unrelated histories (拒绝合并不相关仓库)
原文地址 https://blog.csdn.net/lindexi_gd/article/details/52554159 本文讲的是把git在最新2.9.2,合并pull两个不同的项目,出现的问题 ...
- Git:pull --rebase 和 merge --no-ff
首先是吐嘈 如果你正在 code review,看到上图(下文将称之为:提交线图)之后,特别是像我这样有某种洁癖的人,是否感觉特别难受?如果是的话,请看下文吧 :) 为什么 Git 作为分布式版本控制 ...
- Git 一次性 pull push 所有的分支
/********************************************************************************* * Git 一次性 pull pu ...
随机推荐
- [boostrap]debian下为arm创建debian和emdebian文件系统
转自:http://www.cnblogs.com/qiaoqiao2003/p/3738552.html Debian系统本身包含对arm的支持,其包含的软件包最多,但是最终的文件系统要大一些. e ...
- linux 串口 特殊字符
近日在写一个linux的串口程序,发现大多数情况下数据接收没问题,但是有时却有问题.主要是接收的字符串中包含有0x03这个字符,会造成与它相邻的字符同时也接收不到,搞了好久才发现这个错误.查找资料后发 ...
- Bitmap转灰度字节数组byte[]
工作中遇到图片转灰度数组的须要,经过研究和大神的指导.终于得到例如以下两个方法.能够实现位图转灰度数组 简单的位图转灰度数组就是:得到位图中的每一个像素点,然后依据像素点得到RGB值,最后对RGB值, ...
- php7 安装扩展
安装mongodb扩展 前提:安装好php7,位置:/usr/local/php 方法一: /usr/local/php7/bin/pecl install mongodb service php-f ...
- EasyUI Pagination 分页分页布局定义 显示按钮布局
//分页布局定义.该属性自版本 1.3.5 起可用.//布局项目包括一个或多个下列值://1.list:页面尺寸列表.//2.sep:页面按钮分割.//3.first:第一个按钮.//4.prev:前 ...
- [android] AndroidManifest.xml - 【 manifest -> permission】
在 API Level 1 时被引入 语法: <permission android:description="string resource" android:icon= ...
- IIS状态码大全【转】
对于站长来说,经常分析下网站的IIS日志是有好处的,这样可以随时了解SE蜘蛛是否经常光顾自己的网站,都抓取了哪些页面,被抓取的页面哪些是被正常的,哪些是不正常的.而IIS日志有专门的返回状态码,为了方 ...
- WinDbg 解决Font.ToLogFont AccessViolationExcetion
有个程序总是在windows 2003 server 异常退出. 并且, 查看调用栈也肯奇怪, 应该是很正常的调用. 怀疑是堆溢出. 开启heap trace : C:\Program Files\ ...
- 【Python】python-memory-management
http://deeplearning.net/software/theano/tutorial/python-memory-management.html#python-memory-managem ...
- DecimalFormat 四舍五入Float类型的坑
今天又踩了一个坑,使用DecimalFormat来完毕四舍五入.可是传入的是float类型,几轮測试才发现一个问题,传入的float会被转为double类型.大家都知道float是4位,double是 ...