title: Git Submodule is not shown as changed after merging branch where it was updated
body: <h2>Original Question</h2>
  
  <p>I am working in a git repository containing multiple submodules, one of which shows strange behaviour: I'm working on a feature branch, let's call it <code>featureBranch</code>. This branch was created from my <code>develop</code> branch. While I worked on my feature, someone updated the submodule and committed the changes to <code>develop</code>. My repository now looks like this:</p>
  
  <pre><code>* 10000003 (HEAD -&gt; featureBranch) Work on my feature
  | * 10000002 (develop) Update submodule
  |/
  * 10000001 some commit
  </code></pre>
  
  <p>To be up to date, I want to merge the current <code>develop</code> into <code>featureBranch</code> via <code>git merge develop</code>. Upon running a <code>git status</code> call, I would expect to see changes in the submodule, since my submodule is, of course, not yet updated to <code>develop</code>s' status. This, however, is not the case. After the merge, there are no submodule changes shown and the submodule remains in the state from commits <code>10000003</code> and <code>10000001</code>.</p>
  
  <p>This is a simplified description of my repository and the number of commits. I tried to reproduce this with a minimal example repo, but was not able to. In a minimal case, everything works as expected, with the submodule showing changes after the merge and a <code>git submodule update</code> call setting it to its' stage from commit <code>10000002</code>. I can, however, repoduce this in my productive repository via <code>reset --hard</code> and a new <code>merge develop</code> as often as I want.</p>
  
  <p>Aside the command line, I occasionaly use GitKraken, that has some known issues with submodules. I thus cannot exclude it as the source of this, but since this happens also when exclusively using the command line, it does not seem likely to me.</p>
  
  <p>Does anyone have a clue why a submodule change from a branch where it was changed would not carry over on a merge to a branch where the submodule did not change? Any hints are appreciated.</p>
  
  <h2>Remarks</h2>
  
  <p>As it turned out, the simplification in my question was not valid. In reality, <code>featureBranch</code> originated from <code>develop</code> a long time back. There where merges from <code>develop</code>to <code>featureBranch</code> from time to time, and I sucpect some of these merges along with local <code>develop</code> diverging from origins' and some hard resets in between as the source of this. Due to the tangled history, it's very hard to pinpoint the real reason, and I don't have time to untangle it all.</p>
  
  <p>After merging <code>develop</code> into <code>featureBranch</code> and adding another commit changing the commit of the submodule in question, I looked at the submodule via GitKrakens' file history, and strangely it shows the following (read bottom-up):</p>
  
  <pre><code>+Commit 183 //new commit id
  -Commit ad7 //commit id from develop the submodule should have been on after merge,
                but it actually was on ccc and did not show any changes!
  
  **This is where the merge happened. Below is the file history from featureBranch
  
  +Commit ccc //new commit id
  -Commit ff9 //old commit id
  
  +Commit ff9 //new commit id
  -Commit bb6 //old commit id
  
  +Commit bb6 //new commit id
  -Commit 3f9 //old submodule commit id
  </code></pre>
  
  <p>I am still very confused about this issue, but will not investigate futher. If anyone can bring light to this, I would be very happy.</p>