title: Modify file before commit with pre-commit hook
body: <p>I am trying to write a pre-commit hook that modify a line in my code but I do not know even from where to start.</p>
  
  <p>The problem is:</p>
  
  <p>I have a <code>KEY</code></p>
  
  <pre><code>public static final String APP_KEY = ""; //DELETE THE KEY BEFORE COMMIT!!!
  </code></pre>
  
  <p>In order to avoid publishing the KEY to the repository I've think maybe git hooks are the thing we need instead of delete the key manually. I've take a look at <a href="http://git-scm.com/book/en/Customizing-Git-Git-Hooks" rel="nofollow noreferrer">Customizing git hooks</a> but I do not know how to write the hook.</p>
  
  <p>Is there a way to before commit the changes, delete the KEy and after the commit write the key again?</p>