11

I need the assume-unchanged flag to avoid wrong commits of my project settings files. I do this via:

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

There is also a way to disable this with --no-assume-unchanged.

Now I added 5 files in this way and subsequently decided to add some of them again with the counter-flag.

Is there a way to list all these files declared as "assume-unchanged"?

Thanks a lot!

John Rumpel
  • 4,535
  • 5
  • 34
  • 48

2 Answers2

13

You can use the lower-level command ls-files:

% git ls-files -v
h a.txt
H b.txt

If the first character is lowercase, it is marked as "assume unchanged", in this case a.txt. See also the man page of ls-files.

robinst
  • 30,027
  • 10
  • 102
  • 108
1

According to the man page of git update-index :

To see which files have the "assume unchanged" bit set, use git ls-files -v.

And according to the man page of git ls-files :

-v

[...] use lowercase letters for files that are marked as assume unchanged

So in order to get all files marked as assumed unchanged use :

ls-files -v | egrep -r "^[a-z] .*"
Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240