title: git ignore file header
body: <p>In one of my projects all source files have a file header that is being updated by an other program on which I have no influence at all. The files are all checked in into a git repository which I use to track my changes. 
  My problem is that when this other program changes the header just slightly I have to look through these changes and check them in, even if they have absolutely nothing to do with the source code.</p>
  
  <p>Is it in git somehow possible to ignore a specific part of every file?</p>
  
  <p>The header always covers the same amount of lines (the first 22 lines) and always looks like this:</p>
  
  <pre><code>/**
   * \addtogroup ....
   * \ingroup ...
   * \{
   * 
   * \file        ....
   *
   * \brief       .....
   *
   * \author      $Author: ...... $
   *
   * Revision:    $Revision: .... $
   * Created on:  $Date: ...... $
   *
   * &lt;br&gt;=====================================================&lt;br&gt;
   * &lt;b&gt;Copyright 2012 by ...............&lt;/b&gt;
   *
   *  ...........................................................&lt;br&gt;
   *  Restricted rights to use, duplicate or disclose of this code&lt;br&gt;
   *  are granted through contract.
   * &lt;br&gt;=====================================================&lt;br&gt;
   */
  </code></pre>
  
  <p>I did find this "<a href="http://git-scm.com/book/ch7-2.html#Keyword-Expansion" rel="nofollow">Keyword-Expansion</a>" but this seams a bit complicated since I don't want git to update the header (only to ignore it). And also the Ruby script poses a bit of a problem: It is not possible to install ruby on every computer for this.</p>
  
  <p>An other approach would be to remove the header on every 'commit' and add a standard version of that header upon every 'pull' but I don't know how that could be done.</p>