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!
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.
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] .*"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With