How can I tell git that although I want to enable git fetch on some branches, I donβt want to allow git push on these branches.
In other words, I have some branches that reflect the "current work", and I want to push them to my upstream repository. But I have other branches (including the master) that I intend to reflect "other work" in the context of the local repository, and I do not want to backtrack from these branches from here.
This is my remote repository, and in other contexts I want to be able to push all its branches. But not from this particular local instance.
I think this is possible because git remote show origin sometimes told me that I have branches configured for "git pull", but not for "git push". But I donβt understand the configuration files enough to create this effect manually, and I donβt understand the git command line language well enough to do it there.
Currently, I can best make sure that my local copy is outdated for upstream branches that I want to stay intact. (Also, by explicitly indicating the receiving branch on my command line, git push - indicating that I only want to paste into the remote instance corresponding to the branches of the locally checked branch - prevents clicking on unwanted branches. But I would like to eliminate this complication.)
rdm
source share