Can I tell Git to ignore changes in some tracked file when commiting a folder? So that, for example, if I decide to ignore 'private.conf', it wouldn't stage it for commit if I do 'git commit .', but it would be normally working if I explicitly tell it to 'git commit private.conf'.
Please also take in account that
- I know that I can just explicitly tell git which files to commit each time (e.g. "git commit source1.c source2.c"), but that's extremely convenient for me. Instead of that, I'd tell git to commit all files but 'private.conf'.
- Some stackoverflow topics suggest to rename private.conf to private.conf.template, then run 'git rm --cached private.conf'. For some reasons that's also unconvenient for me. Please don't suggest me that. Thanks.
- I know that I can also do 'git update-index --assume-unchanged private.conf' - and this would do exactly what I want, but only for my local git repository. What I'm searching for is a way to do that for remote branch (and all git repositories cloned from that remote branch as well).