Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First and foremost, you need to talk to your supervisor about the expected workflow for your project. The following general advice should be good for most situations, but your project may have reasons to do things differently.</p> <p>In general, you should strive to make the published history of your repository as clean as possible. Cleanliness can be judged by:</p> <ul> <li>Small, cohesive changesets</li> <li>Clean up or refactoring should be committed separately from new features.</li> <li>Each commit should pass test (to allow for tools such as <a href="http://www.selenic.com/hg/help/bisect" rel="nofollow"><code>bisect</code></a>)</li> </ul> <p>In all DVCS, there is the concept of <em>local</em> vs. <em>published</em> history. In most workflows, a changeset is considered to be <em>published</em> once it has been pushed to a public repository that other people have cloned.</p> <p>There are two basic rules regarding editing the history of a repo:</p> <ol> <li><p><strong>Once you have published a changeset, you should not modify history.</strong> This implies that it is important to only push changesets that are ready to be published. In Mercurial terms, do not <code>hg push</code> all your outgoing changes. Instead, use <code>hg push -b &lt;branch&gt;</code> or <code>hg push -r &lt;rev&gt;</code> to perform a targeted push of specific changes. See <a href="http://mercurial.selenic.com/wiki/EditingHistory" rel="nofollow"><code>EditingHistory</code></a> on the Mercurial wiki for more specific reasoning and advise.</p></li> <li><p><strong>Before publishing changesets (i.e. while they are local), you are free to amend, rebase, collapse, etc. as needed to create a 'clean' history.</strong> In git, this is accomplished using <a href="http://git-scm.com/docs/git-commit" rel="nofollow"><code>git commit --amend</code></a> or <a href="http://git-scm.com/docs/git-rebase" rel="nofollow"><code>git rebase</code></a>. Mercurial has extensions such as <a href="http://mercurial.selenic.com/wiki/MqExtension/" rel="nofollow"><code>queues (mq)</code></a>, <a href="http://mercurial.selenic.com/wiki/HisteditExtension" rel="nofollow"><code>histedit</code></a> and <a href="http://mercurial.selenic.com/wiki/CollapseExtension" rel="nofollow"><code>collapse</code></a>.</p></li> </ol> <p>On most projects, developers are expected to clean up their own code prior to submitting it for review and or publishing it. This saves the reviewer/integrator from wasting time on messy work.</p>
 

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