Git branching: master vs. origin/master vs. remotes/origin/master
来源:互联网 发布:手机阅读pdf软件 编辑:程序博客网 时间:2024/05/20 21:22
Git branching: master vs. origin/master vs. remotes/origin/master
I think I'm on the right track to understand the basic concepts of git.
I've already set up and cloned a remote repository. I also created a server side empty repository, and linked my local repository to it.
My problem is that I don't understand the difference between:
- origin/master vs. remotes/origin/master
As far as I have understood, master is a local branch, and remotes/origin/master is a remote one.
But what exactly is origin/master?
4 Answers
Take a clone of a remote repository and run git branch -a
(to show all the branches git knows about). It will probably look something like this:
* master remotes/origin/HEAD -> origin/master remotes/origin/master
Here, master
is a branch in the local repository. remotes/origin/master
is a branch named master
on the remote named origin
. You can refer to this as either origin/master
, as in:
git diff origin/master..master
You can also refer to it as remotes/origin/master
:
git diff remotes/origin/master..master
These are just two different ways of referring to the same thing (incidentally, both of these commands mean "show me the changes between the remote master
branch and my master
branch).
remotes/origin/HEAD
is the default branch
for the remote named origin
. This lets you simply say origin
instead of origin/master
.
- Git branching: master vs. origin/master vs. remotes/origin/master
- 关于remotes/origin/HEAD -> origin/master
- git push origin master
- git origin master
- git origin/master
- brew update 失败 Error: Failed while executing git pull origin refs/heads/master:refs/remotes/origin/
- git pull origin master出错
- $ git push -u origin master
- git origin和master分析
- 关于origin和master
- Git 的origin和master分析
- Git 的origin和master分析
- Git 的origin和master分析
- Git 的origin和master分析
- Git的origin和master分析
- Git 的origin和master分析
- Git 的origin和master分析 .
- Git 的origin和master分析
- 在ios中,关于Category的概念,非正式协议,类扩展
- Cortex系列M0-4简单对比
- HibernateTemplate、HibernateDaoSupport两种方法实现增删改查Good
- AVAudioPlayer播放mp3模拟器有声真机无声的解决方法
- PHP FastCGI RCE Vul
- Git branching: master vs. origin/master vs. remotes/origin/master
- 用系统sfc.exe程序检测修复系统文件
- 【mongodb系统学习之三】进入mongodb shell
- 标示符
- 深入理解Java多态性
- Chapter 4. URLs
- python字典多键值及重复键值的使用
- android 第三方应用-新浪微博授权
- Windows Mobile Emulator:Failed to open the VPC Network Driver.