如何在上游执行 git status ?

aer*_*man 5 git upstream-branch

在我的分叉存储库中,我设置了一个remote originand remote upstream(原始存储库)。

git status 与原点比较
我如何比较upstream

谢谢

Von*_*onC 3

为了让 git status 将当前分支与不同的远程分支进行比较,您需要为所述分支设置该远程分支

git config branch.<mybranch>.remote upstream
Run Code Online (Sandbox Code Playgroud)

然后重试git status(可能在 a 之后git remote update)。

更多信息请参阅“在 Git 状态上选择远程”。