Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set up git to pull and push all branches

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.

like image 404
lprsd Avatar asked Dec 16 '09 13:12

lprsd


People also ask

How do I push all branches at once?

To push the all branches to a remote git, we can use the git push command followed by the --all flag and origin.

Does git push push all branches?

No, git push only pushes commits from current local branch to remote branch that you specified in command.

Does git pull pull all branches?

git pull fetches updates for all local branches, which track remote branches, and then merges the current branch.


1 Answers

The simplest way is to do:

git push --all origin 

This will push tags and branches.

like image 200
brimble2010 Avatar answered Sep 18 '22 17:09

brimble2010