簡體   English   中英

有沒有一種方法可以在不設置遙控器的情況下簽出Github存儲庫和分支?

[英]Is there a way to checkout a Github repo and branch without setting up a remote?

要評估對我們項目回購的拉取請求,似乎需要執行以下操作:

git remote add newcontributor https://github.com/newcontributor/ourproject
git fetch newcontributor
git checkout newcontributor/pr-branch
...
git remote rm newcontributor

有沒有更簡單的方法?

啊,Github讓這變得容易。 在“拉取請求”頁面的底部,有一個鏈接:

在此處輸入圖片說明

這給出了使用git pull從URL合並的命令:

git checkout -b newcontributor-prbranch master
git pull https://github.com/newcontributor/ourproject.git pr-branch

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM