Git Push

This article was published 5 years ago. Due to the rapidly evolving world of technology, some concepts may no longer be applicable.

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

Thoughts on this post

Leave a comment?