gh pr checkout

查看 git 中的 PR

gh pr checkout {<number> | <url> | <branch>} [flags]

Options

-b, --branch <string>
本地分支名 (默认: the name of the head branch)
--detach
以一种分离 HEAD 的状态,查看 PR
-f, --force
重设本地分支为最新的PR
--recurse-submodules
在 checkout 之后,更新所有的 submodules

Options inherited from parent commands

-R, --repo <[HOST/]OWNER/REPO>
使用 [HOST/]OWNER/REPO 格式,选择另一存储库

See also