Set up git to pull and push all branches

Lakshman Prasad picture Lakshman Prasad · Dec 16, 2009 · Viewed 246.4k times · Source

I'd like to push and pull all the branches by default, including the newly created ones.

Is there a setting that I can define for it?

Otherwise, when I add a new branch, locally and I want to pull it from the server, what is the simplest way to do it?

I created a new branch with the same name and tried to pull but it doesn't work. Asks me for all the remote config of the branch. How do I set it.

Answer

brimble2010 picture brimble2010 · May 7, 2012

The simplest way is to do:

git push --all origin

This will push tags and branches.