With a mercurial repository, after initialising it, do I need to commit to the master branch first, before creating another named branch, or can I do:
hg init
hg branch develop
and then commit onto the develop branch, before at some stage merging develop into the master.
Mercurial really doesn’t have the concept of a master branch; they are all equal and all hg changesets belong to one and only one branch. There is a convention of naming the initial branch as
defaultand that name is used until you create a new branch, but you don’t need to use that name. In your case, since the initial commit is made to a branch nameddevelop, no other branch names exist, includingdefault, until you subsequently create and commit one.Without using a branch command:
Using a
branchcommand: