newbie question- "git pull" complains about *.iml files
I'm both a git and Community Edition newbie. Why are the *.iml files for Community Edition versioned? Every time I try to do a pull it complains about my local modifications. What's the best practice here?
Thanks
请先登录再写评论。
Hello George,
Why do you need to perform any modifications to .iml files? They are designed
to be shareable.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Well clearly I'm doing something wrong, as I'm not (explicitly) editing anything, yet I'm ending up with modified *.iml files. I checked out the project via the command line as per the guidelines at http://www.jetbrains.org/pages/viewpage.action?pageId=983225. Then, using IDEA 94.273 EAP, I opened the project and did NOTHING ELSE. After it loaded & indexed everything, I end up with the following:
~/work/community$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .idea/compiler.xml
# modified: .idea/inspectionProfiles/idea_default.xml
# modified: .idea/inspectionProfiles/idea_default_no_spellchecker.xml
# modified: .idea/misc.xml
# modified: .idea/projectCodeStyle.xml
# modified: RegExpSupport/RegExpSupport.iml
# modified: build/build.iml
# modified: community-main.iml
# modified: community-resources/community-resources.iml
# modified: images/images.iml
# modified: java/compiler/forms-compiler/forms-compiler.iml
# modified: java/compiler/impl/compiler-impl.iml
# modified: java/compiler/javac2/javac2.iml
# modified: java/compiler/notNull/notNull.iml
# modified: java/compiler/openapi/compiler-openapi.iml
# modified: java/debugger/impl/debugger-impl.iml
# modified: java/debugger/openapi/debugger-openapi.iml
# modified: java/execution/impl/execution-impl.iml
# modified: java/execution/openapi/execution-openapi.iml
# modified: java/idea-ui/idea-ui.iml
# modified: java/java-impl/java-impl.iml
# modified: java/java-runtime/java-runtime.iml
# modified: java/java-tests/java-tests.iml
# modified: java/jsp-base-openapi/jsp-base-openapi.iml
# modified: java/jsp-openapi/jsp-openapi.iml
# modified: java/jsp-spi/jsp-spi.iml
# modified: java/openapi/openapi.iml
# modified: java/testFramework/testFramework-java.iml
# modified: platform/annotations/annotations.iml
# modified: platform/boot/boot.iml
# modified: platform/bootstrap/bootstrap.iml
# modified: platform/extensions/extensions.iml
# modified: platform/forms_rt/forms_rt.iml
# modified: platform/icons/icons.iml
# modified: platform/lang-api/lang-api.iml
# modified: platform/lang-impl/lang-impl.iml
# modified: platform/lvcs-api/lvcs-api.iml
# modified: platform/lvcs-impl/lvcs-impl.iml
# modified: platform/platform-api/platform-api.iml
# modified: platform/platform-impl/platform-impl.iml
# modified: platform/platform-main/platform-main.iml
# modified: platform/platform-resources-en/platform-resources-en.iml
# modified: platform/platform-resources/platform-resources.iml
# modified: platform/smRunner/smRunner.iml
# modified: platform/testFramework/testFramework.iml
# modified: platform/testRunner/testRunner.iml
# modified: platform/usageView/usageView.iml
# modified: platform/util/util.iml
# modified: platform/vcs-api/vcs-api.iml
# modified: platform/vcs-impl/vcs-impl.iml
# modified: platform/xdebugger-api/xdebugger-api.iml
# modified: platform/xdebugger-impl/xdebugger-impl.iml
# modified: plugins/InspectionGadgets/InspectionGadgetsPlugin.iml
# modified: plugins/IntelliLang/IntelliLangJava.iml
# modified: plugins/IntentionPowerPak/IntentionPowerPackPlugin.iml
# modified: plugins/ant/ant.iml
# modified: plugins/commander/commander.iml
# modified: plugins/copyright/copyright.iml
# modified: plugins/cvs/cvs-core/cvs-core.iml
# modified: plugins/cvs/cvs-plugin/cvs-plugin.iml
# modified: plugins/cvs/javacvs-src/javacvs-src.iml
# modified: plugins/cvs/smartcvs-src/smartcvs-src.iml
# modified: plugins/devkit/devkit.iml
# modified: plugins/eclipse/eclipse.iml
# modified: plugins/generate-tostring/generate-tostring.iml
# modified: plugins/git4idea/git4idea.iml
# modified: plugins/groovy/jetgroovy-tests.iml
# modified: plugins/groovy/jetgroovy.iml
# modified: plugins/groovy/rt/groovy-rt.iml
# modified: plugins/java-i18n/java-i18n.iml
# modified: plugins/junit/junit.iml
# modified: plugins/junit_rt/junit_rt.iml
# modified: plugins/maven/maven.iml
# modified: plugins/properties/properties.iml
# modified: plugins/spellchecker/spellchecker.iml
# modified: plugins/svn4idea/svn4idea-tests.iml
# modified: plugins/svn4idea/svn4idea.iml
# modified: plugins/testng/testng.iml
# modified: plugins/testng_rt/testng_rt.iml
# modified: plugins/ui-designer/ui-designer.iml
# modified: plugins/xpath/xpath.iml
# modified: plugins/xpath/xslt-rt/xslt-rt.iml
# modified: resources-en/resources-en.iml
# modified: resources/resources.iml
# modified: xml/dom-impl/dom-impl.iml
# modified: xml/dom-openapi/dom-openapi.iml
# modified: xml/impl/xml.iml
# modified: xml/openapi/xml-openapi.iml
#
no changes added to commit (use "git add" and/or "git commit -a")
Hello George,
Could you please look at the diffs for one of the .iml files?
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry,
It was the FindBugs plugin. I disabled it, did a "git reset --hard HEAD", and now the only local modifications I have are:
~/work/community$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .idea/compiler.xml
# modified: .idea/inspectionProfiles/idea_default.xml
# modified: .idea/inspectionProfiles/idea_default_no_spellchecker.xml
# modified: .idea/misc.xml
# modified: .idea/projectCodeStyle.xml
I can now "git pull" without error.
Thanks