简体   繁体   English

在git fork中添加远程仓库

[英]adding in remote repo into git fork

My Git knowledge wasn't very good but I hoped to get some insights on this step-by-step guide that my senior told me as I am running into some problem 我的Git知识不是很好,但是我希望对这份逐步指南的见解,因为我遇到一些问题时,我的上级告诉我

Based on my understanding, I am a bit confused where there is a need to add in the remote repo since the items within and the repo I forked are basically the same. 根据我的理解,我对于需要添加远程回购协议感到有些困惑,因为其中的项目和我派生的回购协议基本相同。

It is as follows: 如下:

  • Fork a repo using the branch test_for_validation within the project called SITE 在名为SITE的项目中使用分支test_for_validation分叉一个test_for_validation
  • Clone the repo locally 在本地克隆仓库
  • Cd to local repo 从CD到本地回购
  • git remote add site ssh://git@....git git远程添加站点ssh://git@....git
  • git pull site git pull网站
  • git checkout site/feature/test_for_validation git checkout网站/功能/ test_for_validation
  • git checkout develop git checkout开发
  • git merge feature/test_for_validation git合并功能/ test_for_validation

While I am at git pull site step, I am seeing a list of * [new branch] xxx followed with a message: 当我在git pull site步骤时,我看到* [new branch] xxx的列表,后跟一条消息:

You asked to pull from the remote 'site', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.

Am I supposed to do something here? 我应该在这里做点事吗?

Additionally, when I did the git clone into my machine, am I suppose to create all the branches, seeing that at the last step it is asking me to merge since currently I only have the master branch... 另外,当我将git clone插入计算机时,我是否想创建所有分支,因为在最后一步中它要求我合并,因为目前我只有master分支...

Lastly can I check if it is necessary for me to create a repository called test_for_validation as I am not seeing this repo of mine in the projects.. 最后,我可以检查是否有必要创建一个名为test_for_validation的存储库,因为我没有在项目中看到我的这个仓库。

I am using Atlassian by the way 我正在使用Atlassian

Based on my understanding, I am a bit confused where there is a need to add in the remote repo since the items within and the repo I forked are basically the same. 根据我的理解,我对于需要添加远程回购协议感到有些困惑,因为其中的项目和我派生的回购协议基本相同。

You would add an 'upstream' remote in order to: 您可以添加“上游”遥控器,以便:

叉子

So in your guide: don't pull, just fetch. 因此,在您的指南中:不要拉,只取。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM