169 похожих чатов

In my project, there's a file which gets modified once

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?

9 ответов

25 просмотров

gitignore?

Martin Rys
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.

Sebastian
The gitignore is not working if the file was alrea...

In that case the solution is to fix your program and add a config file.

required-optional Автор вопроса
Martin Rys
gitignore?

Also I don't want to untrack or ignore the changes. But yes this is the only solution, if I don't find any.

required-optional Автор вопроса
Sebastian
The gitignore is not working if the file was alrea...

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.

required optional
The config files should be committed and tracked. ...

I haven't found a better method that is indipendent of the editor/ide.

required optional
The config files should be committed and tracked. ...

Why not just have your defaults in the code that loads the config

Sebastian
The gitignore is not working if the file was alrea...

you can use filter repo to remove the file from history

Похожие вопросы

Обсуждают сегодня

я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
49
читать файл максимально быстро? странный вопрос))
zamtmn
53
How to create an OS in C? what to study?
Linus
18
Привет, кто может сделать юзербота с апи? Задачи: - создавать группы - создавать каналы - задавать для созданных каналов аватарку или эмоджи, имя группы - добавлять в группы...
Lencore
11
тоесть, указав return eax, сгенерируется никому ненужная инструкция mov eax,eax ?
Aiwan \ (•◡•) / _bot
24
Компания Elif ищет менеджера проектов, который будет заниматься поиском и ведением новых проектов. Прежде чем приступить к работе, вам нужно пройти наш недельный курс, где вы ...
Elif
5
@HemulGM Параметры у AddStream поменялись? Несостыковка какая-то
Катерина Свиридова
12
Подскажите, есть какие-то события создания/уничтожения у TFrame по типу TForm (OnCreate и OnClose/OnDestroy) ? Как отловить создание TFrame и "перед" уничтожением. На Tframe р...
Денис
8
а чем хуже?
Alexey Kulakov
10
Компания Elif ищет менеджера проектов, который будет заниматься поиском и ведением новых проектов. Прежде чем приступить к работе, вам нужно пройти наш недельный курс, где вы ...
Elif
1
Карта сайта