以前对git不熟悉,每次提交代码的时候总会提交.idea、或者target、out目录,这些都是idea运行后所生成的项目配置文件,是没有必要上传的,因此须要配置.gitignore的提交规则,把这些不须要的文件或者目录都忽略掉,减小没必要要的项目文件被提交上去。
下面这个是IntelliJ IDEA下的配置git
# Created by .ignore support plugin (hsz.mobi) ### Maven template target/ pom.xml.tag pom.xml.releaseBackup pom.xml.versionsBackup pom.xml.next release.properties dependency-reduced-pom.xml buildNumber.properties .mvn/timing.properties .idea/ ## File-based project format: *.iws *.iml *.ipr ## Plugin-specific files: # IntelliJ /out/ # mpeltonen/sbt-idea plugin .idea_modules/ # JIRA plugin atlassian-ide-plugin.xml # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties