Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 github 存储库,但在origin&upstream中有点混乱
origin
upstream
告诉我如果我在 BRANCH_B 工作,那么是否需要添加origin关键字来拉取或推送?
$ git pull upstream master
origin并且upstream是遥控器的名称。
您可以使用 来创建和列出它们git remote。
git remote
origin是您创建时创建的默认遥控器git clone,它是您在大多数命令中省略显式遥控器时使用的遥控器。
git clone
我想upstream这只是作为示例创建的另一个远程名称。
据我所知,它们只是遥控器的常用名称。origin是你的“主要”遥控器,upstream是原始仓库的遥控器(假设你的是一个叉子)。