This is most likely because there are 2 or more branch.master.remote in your git config. One from your global git config, and the other from your local git config.
When 2 of them are specified in the git configuration, git loses in order not to assume one or the other, even if the latter has prioritized the former.
The modern repositories you clone should include the configuration locally, but it is likely that branch.master.remote also defined in your global git configuration.
To check if it is installed in your global configuration, use:
git config --global --list | grep branch.master
You can delete or comment out the branch section in your global git config, and you will be fine.
git config --global --remove-section branch.master
This will completely remove [branch "master"] .
If you want to keep it in your global configuration just in case, you can rename it to another branch that you probably won't use.
git config --global --rename-section branch.master branch.someothername
However, you should not get the error of multiple upstream branches when you do git push on the master branch.
git remote show origin also no longer trigger a warning.
josephting Dec 13 '18 at 0:38 2018-12-13 00:38
source share