title: How to unversion file in git and still keep it
body: <p>Let's say I have a file with passwords, I blank them out and then do commit/push. After that I would like for git to stop updating that file, since I will be putting in my passwords back in my local git repo, I don't want to have to remove them every time I do a commit/push.</p>
  
  <p>Is there a way to unversion a file in git but still keep it?</p>
  
  <p>My repo structure is like this:</p>
  
  <pre><code>&gt; my-repo
      &gt; folder1
          &gt; ... other stuff
      &gt; folder2
          &gt; ... other stuff
      &gt; folder3            
          &gt; ... other stuff
          &gt; launch.sh
  </code></pre>
  
  <p>I opened up .git/info/exclude and added this (last) line:</p>
  
  <pre><code># git ls-files --others --exclude-from=.git/info/exclude
  # Lines that start with '#' are comments.
  # For a project mostly in C, the following would be a good set of
  # exclude patterns (uncomment them if you want to use them):
  # *.[oa]
  # *~
  folder3/launch.sh
  </code></pre>
  
  <p>But nothing happens, git keeps versioning the file and all my changes to it, so when i add back the password, it shows up in git diff.</p>