title: How to ignore a file which is already committed?
body: <p>Previously, the following was my <code>.gitignore</code> file:</p>
  
  <pre><code>...
  config/database.yml
  .DS_Store
  </code></pre>
  
  <p>Later I created an <code>app_config.yml</code> file in the config directory and committed it.</p>
  
  <p>Now, I realized that I don't need the <code>app_config.yml</code> file in the git repository.
  And I modified my <code>.gitignore</code> file:</p>
  
  <pre><code>...
  config/app_config.yml
  config/database.yml
  .DS_Store
  </code></pre>
  
  <p>Now, when I commit, that <code>app_config.yml</code> file is still in my repo. 
  I want to remove that file from my repo. How can I do it?</p>