Git的基本概念
2014-03-27 10:12
169 查看
HEAD
HEAD对应当前的状态下的最后一次提交。HEAD对应索引,而非分支。同理FETCH_HEAD.FETCH_HEAD
FETCH_HEAD is a short-lived ref, to keep track of what has just been fetched from the remote repository. git pull first invokes git fetch, in normal cases fetching a branch from the remote; FETCH_HEAD points to the tip of this branch (it stores theSHA1 of the commit, just as branches do). git pull then invokes git merge, merging FETCH_HEAD into the current branch.
The result is exactly what you'd expect: the commit at the tip of the appropriate remote branch is merged into the commit at the tip of your current branch.
This is a bit like doing git fetch without arguments (or git remote update), updating all your remote branches, then running git merge origin/<branch>, but using FETCH_HEAD internally instead to refer to whatever single ref was fetched, instead of needing to
name things.
参考:http://stackoverflow.com/questions/9237348/what-does-fetch-head-in-git-mean
相关文章推荐
- Git基本概念及操作(4)
- Git基本概念
- git的一些基本概念,及单分支操作
- Git本地仓库 (git基本概念)
- 34.开源项目--git标签的基本概念
- GIT基本概念和用法总结
- GIT入门笔记(1)- Git的基本概念
- GIT基本概念和用法总结
- GIT入门篇-基本概念与操作
- GIT基本概念和用法总结
- GIT - 基本概念(分支, 差异, 合并)
- Git基础:基本的Git概念
- GIT基本概念和用法总结
- Git的基本概念与入门
- GIT基本概念和用法总结
- android git gerrit 一些基本概念和问题
- git基本概念
- 学会Git玩转Github笔记(一)——Github基本概念 & 仓库管理
- Git基本概念