If I understand you correctly, you mean files that are matched by rules in a .gitignore but staged using the -f option and then committed. The command this script uses to obtain the list of files to exclude is:
I couldn't get the .py source load on mobile, so I went by the post title. If it goes through ls-files, then it should be fine.
Though it's not really just .gitignore anymore. Plus it depends on git and its performance... I'm just thinking of really large repos. This approach would basically mean that the tree is scanned twice.
If I understand you correctly, you mean files that are matched by rules in a .gitignore but staged using the -f option and then committed. The command this script uses to obtain the list of files to exclude is:
A file staged and committed as described above is not listed using that command, and therefore not excluded from backups.