如何在存储库中拉出一个分支?

how to pull a branch in repository?

所以我有一些存储库,在那个存储库中有 master 和其他分支(或者我们可以调用分支 a、分支 b、分支 c)

我想拉支C,怎么拉?

我正在使用命令行并且 git

你可以这样做:

git pull origin c

然后检查分支

git checkout c

尝试并使用 git switch, not the old obsolete and confusing git checkout command

git fetch
git switch c

那是因为,来自guess mode

If <branch> is not found but there does exist a tracking branch in exactly one remote (call it <remote>) with a matching name, treat as equivalent to

git switch -c <branch> --track <remote>/<branch>