Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I can see two possibilities (taking into account Martin's answer where you are advised to keep <code>default</code> as your main development branch).</p> <p>One Martin has already covered, whereby the first thing you do in a new repository is "initial setup". Typically this may include your standard template <code>.hgignore</code> file. Incidentally I find this to be a better option than...</p> <p>The other option if you have already committed to another named branch is to update to the <code>null</code> changeset (empties your working directory), then <code>merge</code> into it. This creates a branch called "default".</p> <p>First we'll do some work on a development branch:</p> <pre><code>C:\tmp\test&gt;hg init . C:\tmp\test&gt;hg branch devbranch marked working directory as branch devbranch C:\tmp\test&gt;echo something &gt; out.txt C:\tmp\test&gt;hg add . adding out.txt C:\tmp\test&gt;hg commit -m "some work" C:\tmp\test&gt;hg log changeset: 0:4631a4a10552 branch: devbranch tag: tip summary: some work </code></pre> <p>Here we have a single commit on our <code>devbranch</code> branch. When the work is complete (which fortuitously in this case, it is), we want to merge the work back into our (non-existent) <code>default</code> branch. So we update to <code>null</code> prior to doing the merge:</p> <pre><code>C:\tmp\test&gt;hg update null 0 files updated, 0 files merged, 1 files removed, 0 files unresolved C:\tmp\test&gt;hg merge devbranch 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) C:\tmp\test&gt;hg commit -m "merged" C:\tmp\test&gt;hg log changeset: 1:55e879b67c69 tag: tip parent: -1:000000000000 parent: 0:4631a4a10552 summary: merged changeset: 0:4631a4a10552 branch: devbranch summary: some work C:\tmp\test&gt;hg branches default 1:55e879b67c69 devbranch 0:4631a4a10552 (inactive) </code></pre> <p>As you can see, the branch <code>default</code> is created with the first changeset on that branch having two parents, <code>-1</code> and <code>0</code>. After this you would just update to the tip of the <code>default</code> branch when you wanted to merge in - the <code>hg update null</code> would only be done the first time.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload