and forever (like changing http://myProdAddress to 127.0.0.1 blah blah), and I don't want to see this file in the change list before each commit I do.
Using IntelliJ Idea, I can put it in a change list named "unimportant local settings".
But, in Eclipse I can neither hide it, nor group it. (I use "git staging" tab)
Is there any other git plugin providing a solution for this?
gitignore?
The gitignore is not working if the file was already commited. My solution for an similar problem is to use an uncommited file for local settings.
In that case the solution is to fix your program and add a config file.
git rm --cached <file> ?
Also I don't want to untrack or ignore the changes. But yes this is the only solution, if I don't find any.
The config files should be committed and tracked. Because new properties (with default values) will be added to them, on each version. Also, because you need to know what differences your current local environment has (compared to current version). The only problem is that they should not always get shown among other changes in the list. But I found the solution: Creating a file with "_override" suffix, per each config file, containing only overridded properties. Such files can be gitignored. I'm still unsure if it is the best solution or not.
I haven't found a better method that is indipendent of the editor/ide.
Why not just have your defaults in the code that loads the config
you can use filter repo to remove the file from history
Обсуждают сегодня