0

I have a local file that must be ignored for changes. But I also have a template of it in the repo, to guide the user creating it.

I added it to .gitignore to not have it polluting git status, but it still does.

Is it possible to have it ignored for changes, but at the same time making sure it IS in the repo, and retrieved on a git clone?

Florent Georges
  • 2,190
  • 1
  • 15
  • 24
  • 1
    What have you tried? https://stackoverflow.com/questions/36461882/git-how-to-automatically-ignore-a-file-after-a-clone, https://stackoverflow.com/questions/27313564/is-there-a-way-to-set-gitignore-so-that-a-file-is-ignored-except-while-clone, https://stackoverflow.com/questions/9794931/keep-file-in-a-git-repo-but-dont-track-changes – CodeCaster Dec 03 '18 at 13:07
  • I first tracked it, then added it to .gitignore. But what I wanted is `git update-index --assume-unchanged`. Sorry, I did search but couldn't find an answer. Thank you for the response! – Florent Georges Dec 04 '18 at 14:44

0 Answers0