Programing

GitHub에서 다른 사람의 포크에 지점을 가져 오는 방법은 무엇입니까?

lottogame 2020. 7. 6. 07:48
반응형

GitHub에서 다른 사람의 포크에 지점을 가져 오는 방법은 무엇입니까? [복제]


이 질문에는 이미 답변이 있습니다.

GitHub의 리포지토리에서 분기했습니다. 다른 사용자 포크의 지점에서 코드를 가져오고 싶습니다.

이 사용자의 전체 저장소를 별도의 로컬 저장소에 복제해야 git checkout link_to_the_other_users_branch합니까?


$ git remote add theirusername git@github.com:theirusername/reponame.git
$ git fetch theirusername
$ git checkout -b mynamefortheirbranch theirusername/theirbranch

첫 번째 단계에서 리모트를 추가 할 때 리모트에 사용할 수있는 여러 "올바른"URI가 있습니다.

  • git@github.com:theirusername/reponame.git SSH 기반 URI입니다
  • https://github.com/theirusername/reponame.git HTTP URI입니다

어떤 것을 선호 하는가는 상황에 따라 다릅니다. GitHub에는 차이점을 설명하고 선택할 수있는 도움말이 있습니다 : 어떤 원격 URL을 사용해야합니까?


amalloy의 제안 은 저에게 효과적이지 않았습니다. 이것은했다 :

git remote add theirusername https://github.com/theirusername/reponame
git fetch theirusername
git checkout -b mynamefortheirbranch theirusername/theirbranch

자원:

참고 URL : https://stackoverflow.com/questions/9153598/how-do-i-fetch-a-branch-on-someone-elses-fork-on-github

반응형