title: Untrack files that have already been committed to a Git repository and not delete from repo
body: <p>I have conf file that I want to keep some env(<code>ip:port</code>) infos in different branches. So, I want to commit this conf file to dev branch with the content of dev:port and to test branch test:port and master:port etc. After committed these branches, I want to untrack this file because of merges between branches. After some researches everybody suggests <code>git rm -r --cached filename</code> but it's unrelated with my issue. Any suggestion about that?</p>
  
  <p>TL;DR:</p>
  
  <p>A file that wants to keep in a repo but untracked.</p>