android Git使用gitignore建立项目过滤规则
来源:互联网 发布:js转换json字符串 编辑:程序博客网 时间:2024/06/03 14:25
在项目目录下创建 .gitignore 文件,里面的内容如下,可以根据自己的需要新增或者删除过来规则
# Local per-repo rules can be added to the .git/info/exclude file in your
# repo. These rules are not committed with the repo so they are not shared
# with others. This method can be used for locally-generated files that you
# don’t expect other users to generate, like files created by your editor.
.settings
.classpath
bin
coverage
coverage.ec
coverage.em
gen
javadoc
junit-report.xml
lint-results.*ml
lint-results_files
local.properties
monkey.txt
*~
*.iws
atlassian-ide-plugin.xml
target
build
.gradle
out
build.xml
proguard-project.txt
.idea/
*.iml
========================================================================
创建完上面的过滤文件后 需要执行以下方法才能生效:
改动过.gitignore文件之后,在repo的根目录下运行:
git rm -r --cached .
git add .
之后可以进行提交:
git commit -m "fixed untracked files"
如果执行上面方法不能生效,并且在创建上面文件之前已经提交代码到版本库了,那么这个时候可以尝试以下方法将想要过滤的相关文件,那么只能关掉开发工具,然后删除相关想要被过滤的文件。然后
git add -A
git commit -m "fixed untracked files"
git push origin master
git pull
此时打开开发工具即可实现想要的过滤效果了。
- Git使用gitignore建立项目过滤规则
- Git使用gitignore建立项目过滤规则
- Git使用gitignore建立项目过滤规则
- Git使用gitignore建立项目过滤规则
- Git使用gitignore建立项目过滤规则
- Git使用gitignore建立项目过滤规则
- Git使用gitignore建立项目过滤规则
- Git使用Gitignore建立项目过滤规则
- Git使用gitignore建立项目过滤规则
- android Git使用gitignore建立项目过滤规则
- android Git使用gitignore建立项目过滤规则
- Git版本库使用.gitignore建立项目文件过滤规则
- android studio使用.gitignore建立项目过滤规则
- git 创建 .gitignore 文件 建立项目过滤规则
- git 创建 .gitignore 文件 建立项目过滤规则
- git 创建 .gitignore 文件 建立项目过滤规则
- Git提交项目.gitignore的过滤规则
- 关于git中使用gitignore创建过滤规则的使用方法
- 同一个变量打印char类型和unsigned char 类型,引发的思考
- hdu 3874 Necklace(离线操作+树状数组或线段树)
- vijos - P1092全排列 (康托展开 + 康托展开的逆运算)
- Java中keytool的使用
- OJ使用方法
- android Git使用gitignore建立项目过滤规则
- ORACLE RMAN下针对带库设备的操作
- s3n10r[0] 游戏设计背景
- 数据结构绪论1
- Java数据类型分析
- Ibatis 延迟加载(懒加载)含简单实例
- 如何不碌碌无为的活着?
- 异常处理
- 黑马程序员-c语言-字符串求公共子类