Ignore some files when git commits.gitignore

1. If it is a single project, .gitignore can be written less

.gitignore contents:

/target/
*.log
*.class
*.prefs
/bin/
.classpath
.project
/.settings

1. If there are multiple projects, .gitignore should pay attention to adding the path

.gitignore contents:

/gradle/wrapper/gradle-wrapper.properties
##----------Android----------
# build
*/*.apk
*/*.ap_
*/*.dex
*/*.class
*/*.classpath
*/*.pmmeta
*/*.project
*/*.log
*/*.prefs

*/bin/
*/gen/
*/build/
*/target/
*/.settings/

# gradle
.gradle/
gradle-app.setting
!gradle-wrapper.jar
build/

local.properties

##----------idea----------
*.iml
.idea/
*.ipr
*.iws

# Android Studio Navigation editor temp files
.navigation/

##----------Other----------
# osx
*~
.DS_Store
gradle.properties

Guess you like

Origin blog.csdn.net/myfmyfmyfmyf/article/details/124978016
Recommended