Git 从远程某一分支拉代码
时间: 2024-06-08 08:05:41 浏览: 75
你可以使用以下命令从远程仓库的某一分支拉取代码:
```
git clone -b <branch-name> <remote-repository-url>
```
其中,`<branch-name>` 是你想要拉取的分支的名称,`<remote-repository-url>` 是远程仓库的 URL。
举个例子,如果你想要拉取名为 `develop` 的分支,URL 为 `https://github.com/user/repo.git` 的远程仓库的代码,可以使用以下命令:
```
git clone -b develop https://github.com/user/repo.git
```
这将会把远程仓库的 `develop` 分支上的代码拉取到你本地的工作区。
阅读全文
相关推荐


















