If you’ve ever deleted a branch on a remote system only to have it recreated when you
git push, this one’s for you. It will make git only push the current branch by default; other branches are not pushed to the server. This helps to ensure for example that deleted branches do not get re-pushed accidentally.
git config --global push.default current`
If you do want to push all branches you’ve got locally, you can use the
--all flag like so:
git push --all
Michael is a polyglot software engineer, committed to reducing complexity in systems and making them more predictable. Working with a variety of languages and tools, he shares his technical expertise to audiences all around the world at user groups and conferences. You can follow @mheap on Twitter