博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
github中origin和upstream的区别
阅读量:6851 次
发布时间:2019-06-26

本文共 1173 字,大约阅读时间需要 3 分钟。

hot3.png

What is the difference between origin and upstream in github?

When a git branch -a command is done, some branches have a prefix of origin(remotes/origin/..) while others have a prefix of upstream (remotes/upstream/..).

================

This should be understood in the context of  (where you fork a GitHub repo at GitHub before cloning that fork locally)

  • upstream generally refers to the original repo that you have forked
    (see also "" for more on upstream term)
  • origin is your fork: your own repo on GitHub, clone of the original repo of GitHub

From the GitHub page:

When a repo is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repo it was forked from.

To keep track of the original repo, you need to add another remote named upstream

git remote add upstream git://github.com/user/repo.git

You will use upstream to fetch from the original repo (in order to keep your local copy in sync with the project you want to contribute to).

You will use origin to pull and push since you can contribute to your own repo.

You will contribute back to the upstream repo by making a .

fork and upstream

转载于:https://my.oschina.net/uniquejava/blog/481625

你可能感兴趣的文章
centos 学习总结
查看>>
找工作开篇
查看>>
HTML中的<audio>和<video>标签讲解
查看>>
转帖:C++大师Lippman:我对中国程序员的忠告
查看>>
autoit 中_GUICtrlStatusBar_SetBkColor失效的解决办法
查看>>
拓扑排序算法
查看>>
PB中用oracle的存储过程返回记录集做数据源来生成数据窗口,PB会找不到此存储过程及不能正常识别存储过程的参数问题(转)...
查看>>
mysql利用phpmyadmin导入数据出现#1044错误 的可能原因
查看>>
[Linux][C++][Anjuta]提示You must have `glib' installed. (转)
查看>>
测试开发工具配套使用解析
查看>>
java接口与抽象类
查看>>
codefirst 关系处理
查看>>
设计模式之备忘录模式
查看>>
hadoop之 HDFS fs 命令总结
查看>>
快速实现DEDECMS织梦系统伪标题采集
查看>>
去除Html标签
查看>>
目的节点序列距离矢量(DSDV)协议
查看>>
iOS之核心动画
查看>>
Linux问题集
查看>>
parent
查看>>