Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You should certainly try to avoid comitting code which does not work, and perhaps even does not compile (I think even if you clean up hisory with <code>git rebase --interactive</code> before pushing / publishing code). Otherwise value of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html" rel="nofollow noreferrer" title="git-bisect(1) Manual Page - Find by binary search the change that introduced a bug"><code>git bisect</code></a> to find bugs would get greatly diminished.</p> <p>You can use <code>git commit</code> + <code>git commit --amend</code> (or e.g. <a href="http://www.procode.org/stgit/doc/stg-refresh.html" rel="nofollow noreferrer" title="stg-refresh(1) Manual Page - Generate a new commit for the current patch"><code>stg refresh</code></a> if you use <a href="http://www.procode.org/stgit/" rel="nofollow noreferrer" title="Stacked Git">StGIT</a> patch management interface<sup>1</sup>) to snapshot your code without introducing commits with non-working core.</p> <p>The rule of thumb is that commit should do <strong>one thing</strong>, do it well, and do it <strong>completely</strong>.</p> <hr> <h3>Footnotes</h3> <p><sup>1.</sup> Or equivalent for other patch management interfaces, like <a href="http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/man/" rel="nofollow noreferrer" title="guilt(7) Manual Page - quilt on top of git">Guilt</a> for Git, or <a href="http://mercurial.selenic.com/wiki/MqExtension" rel="nofollow noreferrer" title="Mercurial Queues Extension">Mercurial Queues</a> (mq) extension distributed with Mercurial, which was inspiration for Guilt.</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