```console git config --global --add push.default current git config --global --add push.autoSetupRemote true ``` ## 参考 - [Auto setup remote branch and never again see an error about the missing upstream \| pawelgrzybek\.com](https://pawelgrzybek.com/auto-setup-remote-branch-and-never-again-see-an-error-about-the-missing-upstream/)