Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here's the cheat sheet on the commands:</p> <ul> <li><p><strong><code>hg update</code></strong> changes your working copy parent revision and also changes the file content to match this new parent revision. This means that new commits will carry on from the revision you update to.</p></li> <li><p><strong><code>hg revert</code></strong> changes the file content only and leaves the working copy parent revision alone. You typically use <code>hg revert</code> when you decide that you don't want to keep the uncommited changes you've made to a file in your working copy.</p></li> <li><p><strong><code>hg branch</code></strong> starts a new named branch. Think of a named branch as a label you assign to the changesets. So if you do <code>hg branch red</code>, then the following changesets will be marked as belonging on the "red" branch. This can be a nice way to organize changesets, especially when different people work on different branches and you later want to see where a changeset originated from. But you don't want to use it in your situation.</p></li> </ul> <p>If you use <code>hg update --rev 38</code>, then changesets 39–45 will be left as a dead end — a dangling head as we call it. You'll get a warning when you push since you will be creating "multiple heads" in the repository you push to. The warning is there since it's kind of impolite to leave such heads around since they suggest that someone needs to do a merge. But in your case you can just go ahead and <code>hg push --force</code> since you really do want to leave it hanging.</p> <p>If you have not yet pushed revision 39-45 somewhere else, then you can keep them private. It's very simple: with <code>hg clone --rev 38 foo foo-38</code> you will get a new local clone that only contains up to revision 38. You can continue working in <code>foo-38</code> and push the new (good) changesets you create. You'll still have the old (bad) revisions in your <code>foo</code> clone. (You are free to rename the clones however you want, e.g., <code>foo</code> to <code>foo-bad</code> and <code>foo-38</code> to <code>foo</code>.)</p> <p>Finally, you can also use <code>hg revert --all --rev 38</code> and then commit. This will create a revision 46 which looks identical to revision 38. You'll then continue working from revision 46. This wont create a fork in the history in the same explicit way as <code>hg update</code> did, but on the other hand you wont get complains about having multiple heads. I would use <code>hg revert</code> if I were collaborating with others who have already made their own work based on revision 45. Otherwise, <code>hg update</code> is more explicit.</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. 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