title: Update ident string after checkin
body: <p>I have enabled the expansion of <code>$Id:$</code> via <code>ident</code> in the <code>.gitattributes</code> file. This allows me to quickly identify whether the file is outdated when someone else checked out my repository and installed it from there.</p>
  
  <p>Now, I also sync the contents of my own Git repository to other (non-development, i.e. without Git) systems. The trouble is that the keyword expansion only happens on <em>checkout</em>, but my workflow is <em>commit -> push -> sync</em>, so the synced copies contain outdated Ids.</p>
  
  <p><strong>How can I easily force an update of the Ids after a local commit? (Bonus points for doing this automatically after any commit!)</strong></p>
  
  <p>A simple <code>git checkout</code> doesn't work (also not with <code>--force</code>), probably because the file contents haven't changed. Neither does <code>git checkout-index --force</code>. I only managed to accomplish this via either local modification (cumbersome, need to know the modified files):</p>
  
  <pre><code>$ echo "modified" &gt;&gt; file
  $ git checkout file
  </code></pre>
  
  <p>or by temporarily checking out the previous commit:</p>
  
  <pre><code>$ git checkout HEAD^
  $ git checkout HEAD@{1}
  </code></pre>