Currently I have two branches in a Mercurial repository. One the "default" branch where I do most of my development and another a "production" one where the code that is currently live goes.
My question is how do I "merge" my default branch with the production one.
You do
$ hg update production
$ hg merge default
to bring in the new stuff from default
into the production
branch. You'll have to resolve any merge conflicts at this point. There is no chance of data loss since you are working with committed changes. You can abort the merge with hg update -C
and you can re-do the merge of a file foo.c
with
$ hg resolve foo.c
When you're satisfied with the merge, you run
$ hg commit
to create a merge changeset that describes how the two branches should be merged.
There are many tutorials on this, for example:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With