special points about git
1 about "origin/master tracks the remote branch"
1.1 what does tracking mean?
after "git clone", local "master" branch atomatically tracks the remote "origin/master" branch. thus, "git pull master" will fetch the "origin/master" branch it tracks and merge the data to itself. If no such tracking relationship, when we pull, we should use "git pull <远程主机名> <远程分支名>:<本地分支名>".
1.2 what is the remote branch?
it is the branch in the server. We use it to fetch the other's commits.
1.3 if the remote branch receives a commit, what is the effect to "origin/master"
if you don't fetch, the local "origin/master" will not change. but if you fetch, "origin/master" will point to the newest commit on the server.
1.4 what is the "origin/master" branch?
It is a remote branch. "origin" is the default remote repository's name, and master is the default branch name of the remote branch.
We fetch the "origin/master" to get the codes commited by the others. Thus, we need this remote branch.
2 difference between git pull and git fetch
2.1 git pull
fetch the new data from the server and merge it with the specified branch.
git fetch
only fetch the new data from the server, but not merge. the data is stored in the local repository, but not merged into the current branch. and the data will no dirty the working copy.
he take away is to keep in mind that there are often at least three copies of a project on your workstation. One copy is your own repository with your own commit history. The second copy is your working copy where you are editing and building. The third copy is your local "cached" copy of a remote repository.

special points about git的更多相关文章
- Git - Tutorial官方【转】
转自:http://www.vogella.com/tutorials/Git/article.html#git_rename_branch Lars Vogel Version 5.8 Copyri ...
- git版本控制管理实践-2
给网站设置一个 "根目录下的logo.ico", 还是很有必要的,比如赶集网,这时在 "历史"搜索时, 就可以根据 网站的 logo.ico 很轻松的就能够找到 ...
- git设置hooks 钩子
github是可以设置hooks的,看:在设置webhooks & services,可在Just the push event.是设定向你的服务器发请求,然后再做相应的处理. https:/ ...
- Using Git Submodules
NOTE: Following content is directly reprinted from http://patrickward.com/2013/01/09/using-git-submo ...
- [Git] Automatically running tests before commits with ghooks
Wouldn't it be nice if everyone ran the tests before committing code? With ghooks, you can automatic ...
- git第一篇---基本命令
摘要: (1)用git而不是svn.分布式而不是集中式 (2)名词解释 origin是父目录的意思,master是 一个特殊的分支而已.具体参看做最下边: 1.创建仓库 mkdir git cd gi ...
- 如果非得了解下git系统... - 实践篇
git的定义是一个内容寻址文件系统.内容.寻址.文件.系统,该来的总会来的… 本文旨在通过实践来介绍.git文件夹中的目录及文件功能,属git基础知识.但在此基础上可解决各git使用过程中可能遇到的问 ...
- Git Command之Code Review
原文链接 准备 Step 1. Create a team and add a teammate Step 2. Create a repository with some content 应用 Cl ...
- ZOJ2314 Reactor Cooling
Reactor Cooling Time Limit: 5 Seconds Memory Limit: 32768 KB Special Judge The terrorist g ...
随机推荐
- HDU 2036 改革春风吹满地【计算几何/叉乘求多边形面积】
改革春风吹满地 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Sub ...
- 洛谷——P1306 斐波那契公约数
P1306 斐波那契公约数 题目描述 对于Fibonacci数列:1,1,2,3,5,8,13......大家应该很熟悉吧~~~但是现在有一个很“简单”问题:第n项和第m项的最大公约数是多少? 输入输 ...
- python 设计模式之门面模式
facade:建筑物的表面 门面模式是一个软件工程设计模式,主要用于面向对象编程. 一个门面可以看作是为大段代码提供简单接口的对象,就像类库. 门面模式被归入建筑设计模式.门面模式隐藏系统内部的细 ...
- RHEL CentOS Fedora各种源介绍和安装
CentOS默认自带CentOS-Base.repo源,但官方源中去除了很多有版权争议的软件,而且安装的软件也不是最新的稳定版. 下面介绍各种第三方软件库,以下软件库适用于与RHEL完全兼容的li ...
- 解决Ubuntu下gedit中文乱码的情况
windows下简体中文多用GBK编码 (或GB2312, GB18030), 而linux下多用UTF-8编码. 因此,一般来说在微软平台编辑的中文txt不能在ubuntu下直接打开查看,除非在保存 ...
- GIS可视化——热点格网图
一.简介 原理:按照格网大小将区域进行划分,由一个矩形格网替代当前范围内的数据,由格网中心数字代替格网的权重(可以为格网中数据的数量,数据某权重的平均值.最大值.最小值等), 由格网之间颜色的不同表达 ...
- Tomcat 性能监控及调优
1.性能监控 方式1: /usr/local/tomcat7/conf/tomcat-users.xml 添加如下: <role rolename="manager-gui" ...
- OCP-1Z0-051-题目解析-第16题
16. Evaluate the following query: SQL> SELECT promo_name q'{'s start date was }' promo_begin_date ...
- CSRF到底 是个什么玩意?
CSRF CSRF(Cross-site request forgery)跨站请求伪造,也被称为"One Click Attack"或者Session Riding,通常缩写为CS ...
- Locust压力测试Odoo
Table of Contents 编写测试任务集 TaskSet 运行 Locust 分布式 运行 master 运行 slave. Locust 是个伸缩性很好的压力测试框架,OdooLo ...