0

I work with a repo that includes a .vscode folder with a settings.json file:

repo .vscode settings.json

I like to change this settings.json file but do not want to check my changes in. Also I do not want to consider git my working directory to be changed. I added the file to .git/info/exclude but the file still shows up as modified.

I believe that the exclude file works only for files that are not in the repo.

Is it possible that I "override" a file that is in the repo with my own version, such that it does not show up as modified?

citykid
  • 9,916
  • 10
  • 55
  • 91
  • 1
    Yes, with `git update-index --asume-unchanged the-file`. That is a _local_ operation so no other repos are affected by it, – eftshift0 Sep 27 '22 at 15:47
  • perfect, great help, thx so much. if you post the command as answer i am happy to mark it. – citykid Sep 27 '22 at 15:48
  • 1
    https://stackoverflow.com/search?q=%5Bgit%5D+commit+file+ignore+changes – phd Sep 27 '22 at 16:23

0 Answers0