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 ...
随机推荐
- P1450 包裹快递 RP+14【二分】
[题目链接]:https://vijos.org/p/category/%E5%85%B6%E4%BB%96,%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE 描述 一个快递公 ...
- 微信工作汇报系统2——IOS原型设计
上一篇博客:一款自动汇报工作的微信机器人 上一篇博客中说道,我打算自己做一款能自动汇报工作的微信机器人,可惜学识有限,最后不知道怎么实现让机器人学习我的文本说话,所以就一直耽搁了,见天又打开这个系列, ...
- git常用命令,制作缩写命令
目录 基础命令 常用命令列表 查看状态 添加到本地仓库 推送到远程仓库 创建分支 更新分支, 合并分支 查看分支的差异 回滚 其它 缩写命令 基础命令 # 生成SSH key ssh-keygen - ...
- Windows远程命令执行0day漏洞安全预警
网站安全云检测这不是腾讯公司的官方邮件. 为了保护邮箱安全,内容中的图片未被显示. 显示图片 信任此发件人的图片 一.概要 Shadow Brokers泄露多个Windows 远程漏洞利用工具 ...
- 关于Web项目的pom文件处理
pom文件的方式需要修改的是 <packaging>war</packaging> <profiles> <profile> <id>com ...
- 【开发总结】—— BABYLON 项目开发必备系列
前言:在公司主要使用Babylon.js作为前端引擎,我自己在开发中总结到基本上每一个新项目都会需要这些基本设置. 一.ios兼容:解决镜面反射 如果不加offline,材质中有镜面反射,苹果手机 ...
- 【Salvation】——人物角色动画实现
写在前面:这个角色动画主要使用JavaScript编写脚本,在Unity3D游戏引擎的环境中实现. 一.显示角色并实现镜像效果 1.显示贴图: create→cube→修改名称为player,位置归0 ...
- AngularJS中,<span class="bluetext" ng-bind="ctrl.user.name|uppercase"></span>和{{ctrl.user.name|uppercase}}是等价的,但不等于<span class="bluetext" ng-bind="ctrl.user.name|uppercase"/>
代码下载:https://files.cnblogs.com/files/xiandedanteng/angularjsAttenSpan.rar AngularJS中,<span class= ...
- Android开发之布局文件里实现OnClick事件关联处理方法
一般监听OnClickListener事件,我们都是通过Button button = (Button)findViewById(....); button.setOClickLisener....这 ...
- Libimseti推荐系统
技术:easyUI.jQuery.Spring.Struts.Hibernate.Mahout.MySQL 本Libimseti推荐系统使用数据.代码參考<Mahout in action> ...