我正在嘗試克隆 GitHub 存盤庫的特定分支(“dev”分支)。使用 git 命令,我可以運行類似
git clone --branch dev https://github.com/user/repo
gh(GitHub CLI)中的這個等價物是什么?我在檔案中找不到
uj5u.com熱心網友回復:
你可以試試這個:
git clone link_repo -b branch_name --single-branch
在您的情況下,我們使用 cmd:
git clone https://github.com/user/repo -b dev --single-branch
uj5u.com熱心網友回復:
嘗試以下命令克隆特定的branch.
git clone --single-branch --branch <branch-name> <url>
例子:
git clone --single-branch --branch dev https://github.com/test-repo.git
其中,dev是branch名稱。
https://github.com/test-repo.git是網址。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/520047.html
