My local repo has 2 branches: master and doing, I only create commits in doing branch and when I finish the project, I merge it to master branch. When I checkout master branch and push to the remote repo, 2 branches are pushed to the remote. How can I push only master branch to remote repo in order that, commits in doing branch are not appear on remote repo?
You can manually specify which branch to push:
git push origin master
Or you can configure git to always only push the current branch:
git config --global push.default simple
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With