1

I would like to ignore specific changes/files locally for git without using the .gitignore file. Is there a config or extension for this?

All I can find so far is to ignore these files in the .gitignore, however that again causes a local change for the .gitignore file that I then might accidentally commit.

I would find this useful to either temporarily exclude changes that might still be work in progress or specific to my system.

Tris
  • 151
  • 1
  • 10
  • Or alternatively: https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally – 1615903 Feb 25 '22 at 09:07

1 Answers1

1

Use

git update-index --assume-unchanged xxxx  // xxxx is your specific file name(includes path)

git update-index --no-assume-unchanged xxxx  // Undo above operation

The official docs is here.

navylover
  • 12,383
  • 5
  • 28
  • 41