10

I have used the following command to add a file to the repository with some default settings, then change the settings locally without pushing them to the repo every single time:

git update-index --assume-unchanged <filepath>

Now I need to push my local changes to the repo so I would need to undo this command. How would I be able to do this?

Note: I am aware that deleting the repo and then cloning it again would undo this and I have a wild guess that git reset --hard would also work but I have multiple files that are in the same situation and executing the above command to have git ignore them again is just not feasible. Therefore I'm looking for a command that would only affect that specific file.

Vlad Schnakovszki
  • 8,434
  • 6
  • 80
  • 114

1 Answers1

18

To turn off the assume unchanged bit:

git update-index --no-assume-unchanged <filepath>
Edward Thomson
  • 74,857
  • 14
  • 158
  • 187
  • 1
    also note: to get a list of all files with the assume-unchanged bit ```git ls-files -v | grep '^[[:lower:]]'``` (as per https://stackoverflow.com/questions/2363197/can-i-get-a-list-of-files-marked-assume-unchanged ) – Andy Mar 30 '23 at 12:53