JorgeeFG
JorgeeFG

Reputation: 5981

What does --branch do in Push command?

-b --branch BRANCH [+]     a specific branch you would like to push

I've seen many people suggesting the use of -b but I don't understand why, what is it that disturbs them.

Could any one post an example of what would be pushed to the repo with and without --branch option? People says that avoid sending ALL THE BRANCHES but I dont understand it.

Thanks

Upvotes: 0

Views: 51

Answers (1)

zerkms
zerkms

Reputation: 255135

What hg push command does is calculates the difference between what revisions receiver has, and what revisions sender has.

By specifying --branch it will filter out only changesets that belong to a given branch.

That's it: only changeset that belong to it will be pushed, and other local changesets will not be.

Upvotes: 3

Related Questions