On my production server, I just have master always checked out.
I do git pull, which also updates develop branch.
When I commit to master on the production server, and try to git push, it complains for develop that “non-fast-forward updates were rejected”.
How can I deal with master without ever getting problems related to other branches? I don’t even want to know about other branches for this local repo.
You can specify the branch:
If you don’t specify the branch, it goes with what you have in
.git/config.So if you always want to only deal with
masteron the production server, update the.git/configthere removing the other branch associations (so leave the[branch "master"]section but remove the[branch "develop"]section), and then you can justgit pushagain with no arguments.