To create a new branch:
git checkout -b [newbranch_name]
To disable pushes only for a branch:
git config branch.branch_name.remote no_push
If the branch is a local dev branch, it won’t be pushed by default; git push
(no arguments) pushes only branches that exist locally and on the remote. If you try to push it, you’ll only create a new branch.
If you want to completely disable pushes (but still be able to pull):
git remote set-url --push origin no_push
To check you config:
git config -l