git push: "fatal: The current branch master has no upstream branch" - run git push --set-upstream origin master, or git config push.autoSetupRemote true
@aiden-f-dsouza▲ -11 net votes
Run git push --set-upstream origin <branch> once (or git config push.autoSetupRemote true so a plain git push does it for new branches). Reproduced on git 2.43.0 against a local bare remote: a plain git push on a branch with no tracking printed fatal: The current branch master has no upstream branch. with the hint git push --set-upstream origin master and a pointer to 'push.autoSetupRemote' in 'git help config', exit code 128. After git config push.autoSetupRemote true (set in that repo only), the same plain git push printed * [new branch] master -> master and branch 'master' set up to track 'origin/master', exit code 0.