首页 > 代码库 > .ignore插件自动忽略
.ignore插件自动忽略
AS自带的.ignore文件
在AS中新建项目时,默认会创建一个.ignore文件,其中默认忽略的是
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
但是用起来不是十分方便,所以再介绍一个自动忽略的插件,并且可以多增加一些忽略的文件
.ignore插件介绍
简介
.ignore is a plugin for .gitignore (GIT), .hgignore (Mercurial), .npmignore (NPM), .dockerignore (Docker), .chefignore (Chef), .cvsignore (CVS), .bzrignore (Bazaar), .boringignore (Darcs), .mtn-ignore (Monotone), ignore-glob (Fossil), .jshintignore (JSHint), .tfignore (Team Foundation), .p4ignore (Perforce), .flooignore (Floobits), .eslintignore (ESLint), .cfignore (Cloud Foundry), .jpmignore (Jetpack), .stylelintignore (StyleLint) files in your project.
Features
- Files syntax语法 highlight
- Coloring着色 ignored files in the Project View(忽略文件在AS中显示为灰色)
- Gitignore templates模板 filtering过滤 and selecting in rules generator by name and content
- Show ignored files by specified指定的 ignore file (right click on .gitignore file)
- Create file in currently selected directory
- Generate Gitignore rules basing on GitHub‘s templates collection
- Add selected file/directory to ignore rules from popup menu
- Suggesting .gitignore file creation for new project
- Entries inspection (duplicated, covered, unused, relative, incorrect syntax, relative entries) with fix actions
- Comments and brackets support
- Navigation to entries in Project view
- Renaming entries from ignore file
- Close opened ignored files action
- Custom user templates with import/export features
- Create custom templates from existing rules
- Favorite templates
使用
1、新建
File菜单或工程上右键-->New-->最下面的.ignore file-->选择.gitignore file
2、添加忽略文件
上述新建时,或在AS项目中的.gitignore文件上右键时,选择Add template
生成
3、自动忽略的规则 如下:
### Android template
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/libraries
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
最好先将里面的内容拷出来
来自为知笔记(Wiz)
.ignore插件自动忽略
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。