title: Ignore changes in the files, which are in the git repository, locally
body: <p>To make my project work locally I have to change one file. But this file has to be unchanged in the remote. How do I make git ignore the changes in this file when using <code>git status</code>, <code>git add</code> and <code>git stash</code> command?</p>
  <p>What I tried:</p>
  <p>1.</p>
  <pre><code>git update-index --assume-unchanged filename
  </code></pre>
  <p>makes it work with 'git status' and 'git add', but 'git stash'+'git stash pop' restores the file to the original state, breaking my local setup.</p>
  <p>2.
  I found this solution, but it changes remote as well, which I don't want to:
  <a href="https://www.codeblocq.com/2016/01/Untrack-files-already-added-to-git-repository-based-on-gitignore/" rel="nofollow noreferrer">https://www.codeblocq.com/2016/01/Untrack-files-already-added-to-git-repository-based-on-gitignore/</a></p>
  <p>3.
  adding the file to <code>.git/info/exclude</code> doesn't work, since it is a file from the repository, not a new file.</p>