MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1x2jo68/nowaylol/pf3cxl5/
r/ProgrammerHumor • u/programmerjunky • Oct 10 '26
118 comments sorted by
View all comments
Show parent comment
22
You can create your own, separate, local gitignore file, and tell git to use that one in ADDITION to the one in the repo!
https://git-scm.com/docs/gitignore
Then you can do whatever you want without affecting the repo's gitignore
6 u/Xexanos Oct 10 '26 TILThis might actually be useful for my work 6 u/Firewolf06 Oct 10 '26 i have .local.gitignore as both a gitignore file and as an excluded file in my global git config, its quite nice 2 u/ozh Oct 11 '26 You have core.excludesfile=.local.gitignore ?I have this, which works fine but I still have to add .local.ignore to the .local.gitignore... 1 u/Firewolf06 Oct 11 '26 i have that, plus .local.gitignore in ~/.config/git/ignore 1 u/ozh Oct 11 '26 It won't be of any use I think. ~/.config/git/ignore is read only if core.excludesfile isn't set
6
TIL
This might actually be useful for my work
i have .local.gitignore as both a gitignore file and as an excluded file in my global git config, its quite nice
.local.gitignore
2 u/ozh Oct 11 '26 You have core.excludesfile=.local.gitignore ?I have this, which works fine but I still have to add .local.ignore to the .local.gitignore... 1 u/Firewolf06 Oct 11 '26 i have that, plus .local.gitignore in ~/.config/git/ignore 1 u/ozh Oct 11 '26 It won't be of any use I think. ~/.config/git/ignore is read only if core.excludesfile isn't set
2
You have core.excludesfile=.local.gitignore ?
core.excludesfile=.local.gitignore
I have this, which works fine but I still have to add .local.ignore to the .local.gitignore...
.local.ignore
1 u/Firewolf06 Oct 11 '26 i have that, plus .local.gitignore in ~/.config/git/ignore 1 u/ozh Oct 11 '26 It won't be of any use I think. ~/.config/git/ignore is read only if core.excludesfile isn't set
1
i have that, plus .local.gitignore in ~/.config/git/ignore
~/.config/git/ignore
1 u/ozh Oct 11 '26 It won't be of any use I think. ~/.config/git/ignore is read only if core.excludesfile isn't set
It won't be of any use I think. ~/.config/git/ignore is read only if core.excludesfile isn't set
core.excludesfile
View all comments
Show parent comment
22
u/kemitche Oct 10 '26
You can create your own, separate, local gitignore file, and tell git to use that one in ADDITION to the one in the repo!
https://git-scm.com/docs/gitignore
Then you can do whatever you want without affecting the repo's gitignore