How to Automatically Set an Upstream Branch in Git
Git Tip:
Skip --set-upstream! Set the upstream branch automatically using the push.default config. Heres an example:
# Before: Manually setting upstream
git push --set-upstream origin apples
# Configuration to set upstream automatically
git config --global push.default current
# After: Just push, and Git sets the upstream automatically
git push