we use Git, IntelliJ and Maven. We encounter some issues with the configuration files for IntelliJ. E.g. the *.iml files constantly change depending on whether the project was build or re-build or a "mvn clean" was executed. We are aware there are some bugs in IntelliJ that causes these files to change.
The plan was to use "git update-index --skip-worktree" for all *.iml files (and some others). This way one developer can maintain a proper state for these files and if they have to change (new dependencies or modules) to re-enable tracking, changing the files and then switch back to skipping changes. So other developers get the updated files but their changes are not pushed back into the git repository.
According to http://fallengamer.livejournal.com/93321.html this has a chance of working.
This did work with a local test repository. But once moved to the remote it started to behave different. "git status" shows nothing has to be done but switching a branch brings up the message that local changes would be overwritten (mainly the *,iml files which are 'ignored') although "git ls-files -v" shows the right flag on the files.
In IntelliJ there is an empty Window with the same warning, so that is rather confusing.
What did I get wrong with the "skip-worktree" option? Is it not supposed to survive a merge? Or is its behaviour meant for a different purpose?
thanks!