Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure if this is the nature of your problem, but by default, <code>git log</code> will sometimes filter out commits that it thinks aren't "useful" or "interesting" in order to understand the final state of a commit tree. From <a href="http://git-scm.com/docs/git-log" rel="nofollow">the <code>git log</code> docs</a>:</p> <blockquote> <p>Sometimes you are only interested in parts of the history, for example the commits modifying a particular &lt;path&gt;. But there are two parts of <strong>History Simplification</strong>, one part is selecting the commits and the other is how to do it, as there are various strategies to simplify the history. </p> <p>The following options affect the way the simplification is performed:</p> <p><strong><code>Default mode</code></strong><br> Simplifies the history to the simplest history explaining the final state of the tree. Simplest because it prunes some side branches if the end result is the same (i.e. merging branches with the same content).</p> </blockquote> <p>Instead of using the default mode, you can pass in the <code>--full-history</code> flag on your file and see if the "missing" commit shows up that way:</p> <pre><code>git log --full-history -- backend/theimportantfile.js </code></pre> <p>From the <code>git log</code> docs:</p> <blockquote> <p><strong><code>--full-history</code></strong><br> Same as the default mode, but does not prune some history.</p> </blockquote> <h3>Edit</h3> <p>I know this works sometimes because I experienced a situation where I had a commit <code>X</code> in <code>master</code> that contained a change to a file <code>theFile</code>. Commit <code>X</code> was then cherry-picked into <code>anotherBranch</code> by a coworker, so let's call the new commit <code>Y</code>. Then <code>anotherBranch</code> was merged into <code>master</code>.</p> <p>When we did</p> <pre><code>git log -- theFile </code></pre> <p>we would not see <code>Y</code> in the list of commits, just <code>X</code>, but when we used</p> <pre><code>git log --full-history -- theFile </code></pre> <p>only then would both <code>X</code> and <code>Y</code> show up. I guess Git didn't show <code>Y</code> by default because it introduced an identical change to the final state of the commit tree, since it was cherry-picked from <code>X</code>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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. This table or related slice is empty.
    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