Re:Git ignores .gitignore with .gitignore in .gitignore
by coder543 on Wednesday May 18, 2022 @10:00AM
(#31422873)
I think the .conf.example approach is probably better, but the answer to your implied question is here: https://git-scm.com/docs/git-update-index
If you use --assume-unchanged on a file, then git will stop noticing changes at that point. I believe this only applies to your copy of the repo, though.
Re:Git ignores .gitignore with .gitignore in .gitignore
by joboyx on Wednesday May 18, 2022 @05:15PM
(#31427783)
i'm using Intellij, so for scenarios like this I create a separate "changelist" with name "LOCAL-ONLY" and include passwords and any local config that only applies to me.
That way I can clearly see that these changes don't get commited. You can also put line changes on the same file on different changelists.
Changelists concept is native with P4, but not sure with git. Maybe that's why Intellij only have it coz they've implemented their own on top of git.
For now what I do is ignore the config path and commit an "x.conf.example" file, but that is a bit more of a pain to use.