Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update .gitignore #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.idea/workspace.xml
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took from https://www.gitignore.io, using patterns Android and AndroidStudio. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么去掉 /.idea/libraries

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在呢,请忘下看 :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我感觉整个.idea都是可以不加入vcs的,比如:

  • 不同用户可能有不同的词典:disc.xml
  • 不同用户的jdk版本等可能不同: misc.xml
  • fork/clone下来的项目名称可能会和原项目略有区别,导致module稍有不同:modules.xml
  • 此外还可能产生不同的runConfigurations.xml等。

因此我习惯ignore掉整个./idea目录,仅为个人看法,欢迎探讨 😃

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./idea是IDE配置文件啊,如果跟项目本身无关应该不必引入吧

.idea/libraries/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.DS_Store
/build
/captures
Expand Down
21 changes: 0 additions & 21 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

62 changes: 0 additions & 62 deletions .idea/misc.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/modules.xml

This file was deleted.