title: What is the proper way to include a file once into a repository and then ignore subsequent changes?
body: <p>I have some object files and assembly files that I have committed for the first version.  I don't want to commit changes to these files as I make changes to my project and update the other source files.  However, I <em>do</em> want to keep them in my repository, in the first commit.</p>
  
  <p>The two options I know of are:</p>
  
  <ol>
  <li><p>Remove them from the repository:<sup>1</sup><br>
  a. Update .gitignore<br>
  b. <code>git rm --cached &lt;file&gt;</code>  or...  </p></li>
  <li><p><code>git update-index --assume-unchanged &lt;file&gt;</code><sup>2</sup>  </p></li>
  </ol>
  
  <p>Both of these can be seen in this question: <a href="https://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git-repository?rq=1">Ignore files that have already been committed to a Git repository</a></p>
  
  <p>and here:</p>
  
  <p><a href="https://stackoverflow.com/questions/34903137/git-ignore-specific-files-both-on-commit-and-pull/34924052#34924052">Git: ignore specific file(s) both on Commit and Pull</a></p>
  
  <hr>
  
  <p><sup>1</sup> ...However, I'd like them to stay within the repository and they will be removed when the next commit is completed.</p>
  
  <p><sup>2</sup> ...This option, as per <a href="https://stackoverflow.com/a/23305143/2014469">this answer from this question</a> notes:</p>
  
  <blockquote>
    <p>Assume-unchanged should not be abused for an ignore mechanism. It is "I know my filesystem operations are slow...  Especially, it is not a promise by Git that Git will always consider these paths are unmodified... it reserves the right to report that the path has been modified (as a result, "git commit -a" is free to commit that change).</p>
  </blockquote>
  
  <p>So is there a proper way to commit those files once, keep them in that state in the repository, and then ignore any further changes to them?</p>
  
  <p>I did find some information here: <a href="https://gist.github.com/canton7/1423106" rel="nofollow noreferrer">https://gist.github.com/canton7/1423106</a></p>
  
  <p>But it seems... involved.  Is there no actual option that git contains that works as though --assume-unchanged does, but <em>without</em> lying to git?</p>