之前對git不熟悉,每次提交程式碼的時候總會提交.idea、或者target、out目錄,這些都是idea執行後所生成的專案配置檔案,是沒有必要上傳的,所以需要配置.gitignore的提交規則,把這些不需要的檔案或者目錄都忽略掉,減少不必要的專案檔案被提交上去。
下面這個是IntelliJ IDEA下的配置
# 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