How to configure git push to automatically set upstream without -u?

You can configure it with git config --global push.default current (docs) to make it push the current branch to update a branch with the same name.

2022 Update (git>=2.37.0)

git config --global --add --bool push.autoSetupRemote true achieves the same while ALSO setting up the upstream tracking (docs).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)