What should be in my .gitignore for an Android Studio project?
up vote
1100
down vote
favorite
What files should be in my .gitignore
for an Android Studio project?
I've seen several examples that all include .iml
but IntelliJ docs say that .iml
must be included in your source control.
git android-studio gitignore
add a comment |
up vote
1100
down vote
favorite
What files should be in my .gitignore
for an Android Studio project?
I've seen several examples that all include .iml
but IntelliJ docs say that .iml
must be included in your source control.
git android-studio gitignore
5
github.com/github/gitignore
– Yousha Aleayoub
Mar 6 '17 at 15:03
add a comment |
up vote
1100
down vote
favorite
up vote
1100
down vote
favorite
What files should be in my .gitignore
for an Android Studio project?
I've seen several examples that all include .iml
but IntelliJ docs say that .iml
must be included in your source control.
git android-studio gitignore
What files should be in my .gitignore
for an Android Studio project?
I've seen several examples that all include .iml
but IntelliJ docs say that .iml
must be included in your source control.
git android-studio gitignore
git android-studio gitignore
edited May 19 at 14:42
Ashraf.Shk786
5161821
5161821
asked May 24 '13 at 14:04
respectTheCode
20.4k166278
20.4k166278
5
github.com/github/gitignore
– Yousha Aleayoub
Mar 6 '17 at 15:03
add a comment |
5
github.com/github/gitignore
– Yousha Aleayoub
Mar 6 '17 at 15:03
5
5
github.com/github/gitignore
– Yousha Aleayoub
Mar 6 '17 at 15:03
github.com/github/gitignore
– Yousha Aleayoub
Mar 6 '17 at 15:03
add a comment |
29 Answers
29
active
oldest
votes
up vote
1196
down vote
accepted
Updated to Android Studio 3.0
Please share missing items in comments.
A late answer but none of the answers here and here was right on the money for us...
So, here's our gitignore file:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
.navigation
captures/
output.json
#NDK
obj/
.externalNativeBuild
Since Android Studio 2.2 and up to 3.0, new projects are created with this gitignore file:
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
Deprecated - for older project format, add this section to your gitignore file:
/*/out
/*/*/build
/*/*/production
*.iws
*.ipr
*~
*.swp
This file should be located in the project's root folder and not inside the project's module folder.
Edit Notes:
Since version 0.3+ it seems you can commit and push *.iml and build.gradle files. If your project is based on Gradle: in the new open/import dialog, you should check the
"use auto import"
checkbox and mark the"use default gradle wrapper (recommended)"
radio button. All paths are now relative as @George suggested.Updated answer according to @128KB attached source and @Skela suggestions
5
Why do we have to import the project and manually add libs and module dependencies? Is there any way to preserve those things in the repo and when we clone the repo just do a project open?
– Justin
Aug 20 '13 at 5:52
10
The proper way to do this is to check in the *.iml and *.ipr files, and just open them in the IDE. Why force other people on your team to recreate these files, and why allow them to use possibly incorrect settings (such as sdk version)?
– Sky Kelsey
Aug 26 '13 at 22:36
18
@liorry , I disagree. This is the first answer other people will see, and it is massively up-voted. Due to all the things you need to do to get a project up and running after a fresh clone from git using this particular .gitignore I strongly feel this is not what most people would need. Although I guess the number of up-votes tells me otherwise, but I still don't agree. At the very least, perhaps some information stating that you most likely will have to set the project up again and it won't work out-of-the-box.
– Skela
Mar 10 '14 at 14:31
9
@liorry, I don't mean to be rude or anything mate, please don't take it personally. The issue is, these things need to work with minimal amount of setup to be of any practical use. When you need to Import the project, and manually add module dependancies its immediately entered a realm of lunacy. When you are familiar with a project, and know these things inside-out, then there is no issue with your approach. But for a developer who is cloning the project for the first time, its just not that practical. I really am just trying to make sure that your approach does not become the norm thats all.
– Skela
Mar 12 '14 at 8:45
14
You should not version the.iml
files unless you wan't to deal with unneeded annoyances if other users name the project differently when they check out.
– theblang
Feb 26 '15 at 20:35
|
show 53 more comments
up vote
141
down vote
Building on my normal Android .gitignore, and after reading through documentation on the Intellij IDEA website and reading posts on StackOverflow, I have constructed the following file:
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# built native files (uncomment if you build your own)
# *.o
# *.so
# generated files
bin/
gen/
# Ignore gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Eclipse Metadata
.metadata/
# Mac OS X clutter
*.DS_Store
# Windows clutter
Thumbs.db
# Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067)
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
Also note that as pointed out, the built native files section is primarily useful when you are building your own native code with the Android NDK. If, on the other hand, you are using a third party library that includes these files, you may wish to remove these lines (*.o and *.so) from your .gitignore.
10
Almost right. I don't think its a good idea to ignore *.so because you won't be able to work with projects that have linked dependancies on NDK libraries. But a very good starting point by all accounts!
– Skela
Mar 12 '14 at 8:47
@Skela good point. I had these in there from when I was building my own native files - but I have also worked on projects that require a simple copy and paste of pre-built files. I added a note about this to the answer above.
– Phil
Mar 12 '14 at 13:36
@Phil Do you have any opinions about the XML files in.idea/libraries
? Should they be shared or excluded in your opinion?
– Alex Lockwood
May 29 '14 at 18:25
1
@AlexLockwood I think these files should be included if the project is not dependent on another project or module. If, however, the project is dependent on a module that contains the libraries, then this file should be ignored at the project level, but not by the module.
– Phil
May 29 '14 at 18:35
@Phil very cool and I have used this so far but a dex file slips through the cracks: /moduledirectory/build/intermediates/dex-cache/cache.xml - wouldn't it make sense to add **/build in order to exclude the build folders in the modules as well?
– Oliver Hausler
Nov 30 '14 at 17:18
|
show 6 more comments
up vote
74
down vote
Updated 7/2015:
Here is the definitive source from JetBrains
Directory based project format (.idea directory)
This format is used by all the recent IDE versions by default. Here is what you need to share:
- All the files under
.idea
directory in the project root except theworkspace.xml
andtasks.xml
files which store user specific settings - All the
.iml
module files that can be located in different module directories (applies to IntelliJ IDEA)
Be careful about sharing the following:
- Android artifacts that produce a signed build (will contain keystore passwords)
- In IDEA 13 and earlier
dataSources.ids
,datasources.xml
can contain database passwords. IDEA 14 solves this problem.
You may consider not to share the following:
- gradle.xml file, see this discussion
- user dictionaries folder (to avoid conflicts if other developer has the same name)
- XML files under
.idea/libraries
in case they are generated from Gradle project
Legacy project format (.ipr
/.iml
/.iws
files)
- Share the project
.ipr
file and all the.iml
module files, don't share the.iws
file as it stores user specific settings
While these instructions are for IntelliJ IDEA, they hold true 100% for Android Studio.
Here is a .gitignore
snippet that incorporates all of the above rules:
# Android Studio / IntelliJ IDEA
*.iws
.idea/libraries
.idea/tasks.xml
.idea/vcs.xml
.idea/workspace.xml
Which SDKs are supported is defined in the AndroidManifest.xml (and also by Gradle). Any SDK allowed by that setting must be ok for development. Concerning code styles: this is not something that has to be maintained in each project separately, and moreover it should be clarified independent of the IDE. Copyright headers: hopefully, these are in your code base and not in any IDE project files. Otherwise building on the commandline would simply not include them...
– Risadinha
Oct 8 '13 at 10:31
@Risadinha 1) SDKs are defined at the IDE level as well. They are referenced in the Manifest, but the project file contains the actual SDK definitions. 2) Code style should be maintained AT LEAST at the project level. Ideally, everyone would write standard Java, but oh well. 3) Copyright headers are stored in the project. They are used for new file creation, and can contain macros for name, company name, project, date, etc. I recommend you check them out! In summary, the project files contain important meta information about the project that needs to be shared and controlled across the team.
– Sky Kelsey
Oct 8 '13 at 19:18
2
A maintainer has pulled the changes to his own repo. It'll probably be pulled into master soon.
– FalconC
Nov 8 '13 at 21:22
5
JetBrains has deprecated DOC-1186 and put their updated recommendations in a new post: DO INCLUDE: All the files under .idea directory in the project root except the workspace.xml and tasks.xml, and all the .iml files. BE CAREFUL when sharing Android artifacts that produce a signed build (will contain keystore passwords), dataSources.ids and datasources.xml (they may contain passwords). CONSIDER EXCLUDING: gradle.xml, user dictionaries folder, and XML files under .idea/libraries (in case they are generated from Gradle project).
– JSmitty
Feb 5 '14 at 3:07
2
That's a lovely theory but this simply doesn't work for us. We consistently end up with .iml files with entries like this:<orderEntry type="jdk" jdkName="1.6 (38)" jdkType="JavaSDK" />
Notice the number 38 that seems to constantly be being incremented. (the misc.xml file also has this trouble).
– Sam
Jul 9 '14 at 16:38
|
show 5 more comments
up vote
35
down vote
I disagree with all of these answers. The following configuration is working great for our organization's app.
I ignore:
/build
/.idea
(with possible exceptions, see comments in dalewking's answer)*.iml
local.properties
I think almost everyone agrees about /build
.
I got sick of constantly seeing messages about the various library.xml
files that Gradle creates or deletes in /.idea
. The build.gradle
will run on the developers's local when they first check out the project, so why do those XML files need to be versioned? Android Studio will also generate the rest of /.idea
when a developer creates a project using Check out from Version Control
, so why does anything in that folder need to be versioned?
If the *.iml
is versioned a new user will have to name the project exactly the same as it was when committed. Since this is also a generated file, why version it in the first place?
The local.properties
files points to an absolute path on the file system for the SDK, so it definitely shouldn't be versioned.
Edit 1: Added .gradle
to ignore the gradle caching stuff that should not be versioned (thanks Vasily Makarov).
Edit 2: Added .DS_Store
now that I am using Mac. This folder is Mac specific and should not be versioned.
Additional note: You probably also want to add a directory to put your signing keys in when building a release version.
For copy/paste convenience:
.gradle
/build
/.idea
*.iml
local.properties
.DS_Store
4
I agree with your answer. I also believe that neither the *.iml or .idea files should be versioned: stackoverflow.com/a/26290130/2948212
– iberodev
Oct 10 '14 at 0:37
6
My vote is for your gitignore as it is very much like mine. Couple suggestions: Usebuild/
instead of/build
to match module build dirs likeapp/build
. Use.gradle
to match gradle caching directory.
– Vasily Makarov
Apr 14 '15 at 9:15
I also question why the default gitignore lists /build instead of build/ I end up with all the files in app/build in my repository if I use /build
– guyland123
Apr 23 '15 at 21:40
@guyland123 I just noticed that I have another.gitignore
file in my app directory that also contains/build
. Is this auto generated, I can't remember? Sobuild/
will apply to subfolders?
– theblang
Apr 23 '15 at 21:52
@mattblang yes .gitignore is auto generated when you create a new project. It is not created however when you import a project from say Eclipse. build/ will match all directories named "build" beneath the location of the .gitignore file. Eg. app/build will be ignored.
– guyland123
Apr 24 '15 at 13:44
add a comment |
up vote
33
down vote
I use this .gitignore. I found it at: http://th4t.net/android-studio-gitignore.html
*.iml
*.iws
*.ipr
.idea/
.gradle/
local.properties
*/build/
*~
*.swp
1
*/build/ is not ignoring unchanged files in my build directory. any ideas? @Solved: i had to add */*/build/ as my build folder was a couple of directories deep.
– speedynomads
Jul 19 '13 at 10:35
3
Just addingbuild
worked for me.
– Myxtic
Jul 22 '13 at 12:59
**/build worked for me
– Jonathan Lin
Jan 2 '14 at 7:18
1
how about .iml?
– Danail
Jul 2 '14 at 23:18
add a comment |
up vote
32
down vote
In the case of Android Studio, the only files that are required to be saved in version control are the files required to build the application from the command line using gradle. So you can ignore:
- *.iml
- .idea
- build
However, if you save any IDE settings, such as custom code style settings, they get saved in the .idea folder. If you want those changes in version control, then you'd save the IDEA files as well (*.iml and .idea).
3
Thanks for explaining that. From what I have read if you are going to include .idea in your project you should ignore */.idea/workspace.xml and */.idea/tasks.xml
– respectTheCode
May 24 '13 at 15:58
15
do not ignore .idea folder for now. Gradle plugin doesn't have any 'gradle idea' task yet and import project in Android Studio is far from perfect now.
– robotoaster
May 30 '13 at 11:40
2
Also if you are working in a team consider ignoring local.properties because it contains the sdk path hardcoded.
– Calin
Jun 29 '13 at 16:24
@robotoaster, would you still recommend not ignoring the .idea folder?
– loeschg
Oct 30 '13 at 21:00
@Ioeschg no longer required. if you checkout clean git repo use Import New Project and it should work fine as long as build files are present.
– robotoaster
Nov 3 '13 at 17:01
add a comment |
up vote
16
down vote
My advise would be also to not ignore the .idea folder.
I've imported a Git-based Eclipse project to Android Studio and that went fine. Later, I wanted to import this project with Git (like the first time) to another machine with Android Studio, but that didn't worked. Android Studio did load all the files but wasn't able to "see" the project as a project. I only could open Git-files.
While importing the project for the first time (from Eclipse to Android Studio) my old .gitignore was overwritten and the new one looked like this:
- .idea/.name
- .idea/compiler.xml
- .idea/copyright/profiles_settings.xml
- .idea/encodings.xml
- .idea/libraries/libs.xml
- .idea/misc.xml
- .idea/modules.xml
- .idea/scopes/scope_settings.xml
- .idea/vcs.xml
- .idea/workspace.xml
So, I tried to use an empty gitignore and now it worked. The other Android Studio could load the files and the Project. I guess some files are not important (profiles_settings.xml)
for Git and importing but I am just happy it worked.
add a comment |
up vote
11
down vote
For Android Studio 3.0 projects use the following:
.gitignore
.gradle
.idea
*.iml
gradle.properties
local.properties
.DS_Store
build
Gradle project folder
The only thing that should be in your (Gradle) project folder after repository cloning is this structure (at least for the use cases I encountered so far):
/app
/gradle
.gitignore
build.gradle
build.properties
gradlew
gradle.bat
settings.gradle
1
Why should you keep binaries like gradlew and gradle.bat?
– Bilthon
Mar 24 '17 at 2:20
1
@Bilthon They are not binaries. They are gradle start-up scripts for Windows (gradle.bat) and Linux (gradlew).
– Willi Mentzel
Mar 24 '17 at 9:16
Ohh.. I see you're right, but aren't they autogenerated anyways?
– Bilthon
Mar 24 '17 at 21:32
2
@Bilthon Indeed, they are! They are generated with default options. If you change something, they should be included in your repository in order to build it properly when checking it out fresh. They are so small, it doesn't hurt to always keep them.
– Willi Mentzel
Mar 27 '17 at 12:05
add a comment |
up vote
8
down vote
There is NO NEED to add to the source control any of the following:
.idea/
.gradle/
*.iml
build/
local.properties
So you can configure hgignore or gitignore accordingly.
The first time a developer clones the source control can go:
- Open Android Studio
- Import Project
- Browse for the build.gradle within the cloned repository and open it
That's all
PS: Android Studio will then, through maven, get the gradle plugin assuming that your build.gradle looks similar to this:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Android studio will generate the content of .idea folder (including the workspace.xml, which shouldn't be in source control because it is generated) and the .gradle folder.
This approach is Eclipse-friendly in the way that the source control does not really know anything about Android Studio. Android Studio just needs the build.gradle to import a project and generate the rest.
5
Guys, those who vote negatively should provide a valid reason to do so. It might be helpful to let us/all know if we are mistaken with our answer.
– iberodev
Dec 2 '14 at 20:10
1
There is NO NEED
yes there are some cases: copyright templates that need to be share across team members, for instance.
– Henrique de Sousa
May 19 '16 at 14:51
add a comment |
up vote
8
down vote
I support the committing of .idea folder (excluding workspace.xml
and tasks.xml
). But I am starting to come to the conclusion that .iml files should be ignored.
Here is the issue:
Open a project in a directory named "foo" for example and you will get foo.iml and that all seems well and good. The problem is that if I simply rename the directory to foo2 (or clone it into another directory name) when you try to open the project in Android Studio you will get three things:
- A new iml file named foo2.iml
- The iml file for your Android project will be changed to point now to foo2 as its parent
- .idea/modules.xml will have a line added for foo2.iml so it has both the old iml file and the one for the new directory
I can find no way to prevent Android Studio from doing this iml file generation when the project is stored in a different directory. Adding them to source control is going to cause problems. Therefore I think perhaps we should ignore *.iml files and .idea/modules.xml
I ignore both/.idea
and.iml
files. I would like to hear why the.idea
folder should be committed.
– theblang
Jul 10 '14 at 14:36
Looking at my current project, I guess there are only 2 things I have checked in from .idea/: code style settings to enforce for the team and a user dictionary containing words specific to the project that are not real words. I started out with many files in .idea committed, but when a file starts showing up as changed for no good reason it would get added to .gitignore. My point was not so much that .idea should be checked in as it was to say .iml files and modules.xml should not be.
– user486646
Jul 11 '14 at 14:45
What were they?
– theblang
Jul 11 '14 at 14:48
Sorry, SO took my comment before I was done with it (gotta remember that comments don't accept line breaks). Edited with the rest of my thoughts.
– user486646
Jul 11 '14 at 14:52
Thanks! Yeah, those files that you mentioned do make sense. I agree, the biggest headache was thelibrary.xml
files that kept triggering messages. Also, I don't understand why I keep seeing people say that *.iml files should be included, so great point there.
– theblang
Jul 11 '14 at 15:11
add a comment |
up vote
7
down vote
Tested with Android Studio 3.0
You might need to Install .ignore plugin.
You can auto-generate the .gitignore file for Android.
Right click on folder and follow
Then Select Android from left panel and click Generate
Android Studio will generate .gitignore file which contains all the file need to ignore.
Taken from http://menukanows.com/how-to-add-gitignore-file-in-android-project/
add a comment |
up vote
7
down vote
It's the best way to generate .gitignore
via here
1
I can't seem to make this work for Android Studio. If I just select "android" it seems to be an Eclipse implementation. Am I doing it wrong?
– zipzit
Feb 5 '15 at 1:20
The only mention to Eclipse is on one line: "Proguard folder generated by Eclipse". The rest seems OK for AS
– Jose_GD
Feb 26 '15 at 19:37
@zipzit, possibly you are right. It seems the site generates .gitignore not for Android Studio as it doesn't contain .idea/.
– CoolMind
Feb 19 '16 at 12:55
add a comment |
up vote
6
down vote
Depends on how your project format is maintained:
You have two options:
- Directory-based format (You will have a
.idea
folder which contains
the project specific files) - File-based format (configuration files are
.iws
and.ipr
)
Ref:
http://www.jetbrains.com/idea/webhelp/project.html
Files committed to version control depends on the above:
- Include .idea folder to version control, exclude
workspace.xml
and
tasks.xml
- Version control
.ipr
file and all the.iml
module files, exclude
the.iws
file as it stores user specific settings.
Ref:
https://intellij-support.jetbrains.com/entries/23393067
1
all of my projects seem to have both .idea folders and .iws files
– respectTheCode
Jun 11 '13 at 12:07
1
Personally I tried following advice from JetBrains but it didn't work for me. Me and another dev are using Android Studio and we had .idea and .iml file in git. I soon found out that once you start merging commits and get to all sorts of trouble when merge tool fails to merge any of the files under .idea path. As result I added all imls and .idea to gitignore. After all Studio does a very good job of creating project structure when importing Gradle project. So now I just pay close attention to what I have in my gradle files.
– zmicer
Feb 24 '14 at 10:44
add a comment |
up vote
4
down vote
Basically any file that is automatically regenerated.
A good test is to clone your repo and see if Android Studio is able to interpret and run your project immediately (generating what is missing).
If not, find what is missing, and make sure it isn't ignored, but added to the repo.
That being said, you can take example on existing .gitignore
files, like the Android one.
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
11
This is incorrect. You should check in your *.iml files, and most likely .idea and *.ipr as well. The "anything that is automatically generated" part is especially wrong. Most Android projects are automatically generated after all.
– Sky Kelsey
Aug 26 '13 at 22:30
6
The *.iml, *.idea and *.ipr are Android-Studio/IntelliJ specific. They are not needed to build the project. As they are IDE-specific, and not build-chain specific, they should probably not be checked in. Everyone can use any IDE, there is no reason to check in IntelliJ project files and not Eclipse ones, for example.
– Marc Plano-Lesay
Oct 1 '13 at 6:09
2
If you want to work on multiple forks of the same project, or with a team where everyone uses the same IDE, or have version control of the intricate settings you use for your IDE, then yes, you should check the files in. Project files for IntelliJ are much more than simple fluff used to open your code in an editor.
– Sky Kelsey
Nov 18 '13 at 7:00
2
why do my iml files keep showing as changed between me and my colleague? specifically external.root.project.path keeps changing under the <module/> tag
– Sam
Mar 25 '14 at 18:28
Using Android Studio 0.8.12 on Windows 8.1 and on OS X Mavericks with the same project, I notice that the following two files get modified and marked as changed by Git when I open the project: <project name>.iml and .ideamisc.xml. Specifically: <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> gets added or removed to/from <project name>.iml and .ideamisc.xml gets changed to due JDK install differences between the OS's.
– jkwuc89
Oct 13 '14 at 17:44
add a comment |
up vote
4
down vote
I'm kosher with adding the .iml files and Intellij sez to add the .idea folder but ignore .idea/workspace.xml and .idea/tasks.xml, but what about .idea/libraries/ ?
I don't see how it makes sense to add this. It has a list of XML files that list libraries the Android Studio project is supposed to know about. These are supposed to come instead from build.gradle defined dependencies -- not an IDE project file.
Also the contents of one of these files looks like this:
<component name="libraryTable">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/artifacts-26/filestore/com.example/example/etc...jar!"/>
It doesn't make sense to commit this. What if the user specified a different home dir for gradle, or if they use a different gradle version, the path under .gradle/caches/artifacts-xxx
is going to be different for them (i.e. artifacts-
the number appended on the end will relate to the gradle version release you are using.) These paths are not universal, and yet the advice is to check all this in?
add a comment |
up vote
4
down vote
As of Android Studio 0.8.4 .gitignore
file is generated automatically when starting new project.
By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
add a comment |
up vote
3
down vote
I know this is an old topic and there are certainly a lot of options, but I really prefer gibo
by Simon Whitaker. It's super simple to use, cross-platform (mac, *nix, and windows), and uses the github gitignore
repo so it is (basically) always up to date.
Make sure your local cache is up to date:
$ gibo --upgrade
From https://github.com/github/gitignore
* branch master -> FETCH_HEAD
Current branch master is up to date.
Search for the language/technology you need:
$ gibo --search android
Android
Display the .gitignore file:
$ gibo Android
### Android
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
Now, append it to your project's .gitignore file:
$ gibo Android >> .gitignore
(Make sure you use >>
to append to your project's .gitignore file; one >
will overwrite it - as I've done many times on accident!)
I know this isn't answering the OP's exact question, but using gibo makes it so you pretty much don't have to think about 'the question' anymore! .. it's nice! ;)
add a comment |
up vote
3
down vote
To get a better idea, all you need are the following files
- app
- build.gradle
- settings.gradle
You could put everything else in the .gitignore file. All your app changes lies mostly in these files and folders. The rest you see in a basic project are gradle build files or Android Studio configuration files.
If you are using Android Studio, you can use "Import project" to successfully build the project. Alternatively you can build using command line, follow Building Android Projects with Gradle.
add a comment |
up vote
3
down vote
It's best to add up the .gitignore list through the development time to prevent unknown side effect when Version Control won't work for some reason because of the pre-defined (copy/paste) list from somewhere. For one of my project, the ignore list is only of:
.gradle
.idea
libs
obj
build
*.log
add a comment |
up vote
1
down vote
As of Android Studio 0.8.4 .gitignore file is generated automatically when starting new project. By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
build/
/captures
I agree with this statement, however I modify this file to change
/build to build/
(This will include /build and /app/build)
So I don't end up with all the files in app/build in my repository.
Note also that if you import a project from Eclipse, the .gitignore won't be copied, or "automagically" created for you.
add a comment |
up vote
1
down vote
I merge Github .gitignore files
- Android.gitignore
- JetBrains.gitignore
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
Please read: JetBrains Support: How to manage projects under Version Control Systems
2
As of 2016, I follow this answer as the most close to our needs. Thanks
– Henrique de Sousa
May 19 '16 at 15:13
add a comment |
up vote
1
down vote
Github maintains useful gitignore items for various kinds of projects.
Here is the list of useful gitignore items for android projects.
# 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/gradle.xml
.idea/libraries
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
Android Gitignore in github
2
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– imtheman
Feb 15 '17 at 6:39
@imtheman plausible.. I have updated the answer and put the link as reference
– Sudip Bhandari
Feb 15 '17 at 6:42
add a comment |
up vote
0
down vote
Compilation:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Gradle files
.gradle/
build/
/*/build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Eclipse project files
.classpath
.project
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
Why down vote? its working for me..
– Aqib Mumtaz
Jul 12 '16 at 10:53
add a comment |
up vote
0
down vote
To circumvent the import of all files, where Android Studio ignores the "Ignored Files" list, but still leverage Android Studio VCS, I did the following:
This will use the "Ignored Files" list from Android Studio (after import! not during) AND avoid having to use the cumbersome way Tortoise SVN sets the svn:ignore list.
- Use the Tortoise SVN repository browser to create a new project folder directly in the repository.
- Use Tortoise SVN to checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Ignore the warning. Now you have a versioned top level folder with unversioned content.
- Open your project from the local working directory. VCS should now be enabled automatically
- Set your file exceptions in File -> Settings -> Version Control -> Ignored Files
- Add files to SVN from Android Studio: select 'App' in Project Structure -> VCS -> Add to VCS (this will add all files, except "Ignored Files")
- Commit Changes
Going forward, "Ignored Files" will be ignored and you can still manage VCS from Android Studio.
Cheers,
-Joost
add a comment |
up vote
0
down vote
.gitignore from AndroidRate library
# Copyright 2017 - 2018 Vorlonsoft LLC
#
# Licensed under The MIT License (MIT)
# Built application files
*.ap_
*.apk
# Built library files
*.aar
*.jar
# Built native files
*.o
*.so
# Files for the Dalvik/Android Runtime (ART)
*.dex
*.odex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk/ndk path, etc)
local.properties
# Windows thumbnail cache
Thumbs.db
# macOS
.DS_Store/
# Log Files
*.log
# Android Studio
.navigation/
captures/
output.json
# NDK
.externalNativeBuild/
obj/
# IntelliJ
## User-specific stuff
.idea/**/tasks.xml
.idea/**/workspace.xml
.idea/dictionaries
## Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/dynamic.xml
.idea/**/sqlDataSources.xml
.idea/**/uiDesigner.xml
## Gradle
.idea/**/gradle.xml
.idea/**/libraries
## VCS
.idea/vcs.xml
## Module files
*.iml
## File-based project format
*.iws
add a comment |
up vote
0
down vote
https://github.com/github/gitignore is awesome collection
Android.gitignore
# 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/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
add a comment |
up vote
-1
down vote
This official documentation from JetBrains Support says the following should be included:
All files under .idea directory except workspace.xml and tasks.xml because
they store specific user settings
All the *.iml files that can be located in different module directories
It also gives other recommendations of things to be careful about.
1
Why was this voted down? Vote downs with no explanation are the worst thing about SO.
– craned
Jul 9 '16 at 22:53
add a comment |
up vote
-1
down vote
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
add a comment |
up vote
-3
down vote
I had problems with ignoring build files, but this seems to work :-)
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Android Studio
.idea/
.gradle
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.iml
*.iws
*.ipr
*~
*.swp
*/build
*/production
*/local.properties
*/out
add a comment |
protected by Phil Aug 24 at 19:16
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
29 Answers
29
active
oldest
votes
29 Answers
29
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1196
down vote
accepted
Updated to Android Studio 3.0
Please share missing items in comments.
A late answer but none of the answers here and here was right on the money for us...
So, here's our gitignore file:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
.navigation
captures/
output.json
#NDK
obj/
.externalNativeBuild
Since Android Studio 2.2 and up to 3.0, new projects are created with this gitignore file:
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
Deprecated - for older project format, add this section to your gitignore file:
/*/out
/*/*/build
/*/*/production
*.iws
*.ipr
*~
*.swp
This file should be located in the project's root folder and not inside the project's module folder.
Edit Notes:
Since version 0.3+ it seems you can commit and push *.iml and build.gradle files. If your project is based on Gradle: in the new open/import dialog, you should check the
"use auto import"
checkbox and mark the"use default gradle wrapper (recommended)"
radio button. All paths are now relative as @George suggested.Updated answer according to @128KB attached source and @Skela suggestions
5
Why do we have to import the project and manually add libs and module dependencies? Is there any way to preserve those things in the repo and when we clone the repo just do a project open?
– Justin
Aug 20 '13 at 5:52
10
The proper way to do this is to check in the *.iml and *.ipr files, and just open them in the IDE. Why force other people on your team to recreate these files, and why allow them to use possibly incorrect settings (such as sdk version)?
– Sky Kelsey
Aug 26 '13 at 22:36
18
@liorry , I disagree. This is the first answer other people will see, and it is massively up-voted. Due to all the things you need to do to get a project up and running after a fresh clone from git using this particular .gitignore I strongly feel this is not what most people would need. Although I guess the number of up-votes tells me otherwise, but I still don't agree. At the very least, perhaps some information stating that you most likely will have to set the project up again and it won't work out-of-the-box.
– Skela
Mar 10 '14 at 14:31
9
@liorry, I don't mean to be rude or anything mate, please don't take it personally. The issue is, these things need to work with minimal amount of setup to be of any practical use. When you need to Import the project, and manually add module dependancies its immediately entered a realm of lunacy. When you are familiar with a project, and know these things inside-out, then there is no issue with your approach. But for a developer who is cloning the project for the first time, its just not that practical. I really am just trying to make sure that your approach does not become the norm thats all.
– Skela
Mar 12 '14 at 8:45
14
You should not version the.iml
files unless you wan't to deal with unneeded annoyances if other users name the project differently when they check out.
– theblang
Feb 26 '15 at 20:35
|
show 53 more comments
up vote
1196
down vote
accepted
Updated to Android Studio 3.0
Please share missing items in comments.
A late answer but none of the answers here and here was right on the money for us...
So, here's our gitignore file:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
.navigation
captures/
output.json
#NDK
obj/
.externalNativeBuild
Since Android Studio 2.2 and up to 3.0, new projects are created with this gitignore file:
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
Deprecated - for older project format, add this section to your gitignore file:
/*/out
/*/*/build
/*/*/production
*.iws
*.ipr
*~
*.swp
This file should be located in the project's root folder and not inside the project's module folder.
Edit Notes:
Since version 0.3+ it seems you can commit and push *.iml and build.gradle files. If your project is based on Gradle: in the new open/import dialog, you should check the
"use auto import"
checkbox and mark the"use default gradle wrapper (recommended)"
radio button. All paths are now relative as @George suggested.Updated answer according to @128KB attached source and @Skela suggestions
5
Why do we have to import the project and manually add libs and module dependencies? Is there any way to preserve those things in the repo and when we clone the repo just do a project open?
– Justin
Aug 20 '13 at 5:52
10
The proper way to do this is to check in the *.iml and *.ipr files, and just open them in the IDE. Why force other people on your team to recreate these files, and why allow them to use possibly incorrect settings (such as sdk version)?
– Sky Kelsey
Aug 26 '13 at 22:36
18
@liorry , I disagree. This is the first answer other people will see, and it is massively up-voted. Due to all the things you need to do to get a project up and running after a fresh clone from git using this particular .gitignore I strongly feel this is not what most people would need. Although I guess the number of up-votes tells me otherwise, but I still don't agree. At the very least, perhaps some information stating that you most likely will have to set the project up again and it won't work out-of-the-box.
– Skela
Mar 10 '14 at 14:31
9
@liorry, I don't mean to be rude or anything mate, please don't take it personally. The issue is, these things need to work with minimal amount of setup to be of any practical use. When you need to Import the project, and manually add module dependancies its immediately entered a realm of lunacy. When you are familiar with a project, and know these things inside-out, then there is no issue with your approach. But for a developer who is cloning the project for the first time, its just not that practical. I really am just trying to make sure that your approach does not become the norm thats all.
– Skela
Mar 12 '14 at 8:45
14
You should not version the.iml
files unless you wan't to deal with unneeded annoyances if other users name the project differently when they check out.
– theblang
Feb 26 '15 at 20:35
|
show 53 more comments
up vote
1196
down vote
accepted
up vote
1196
down vote
accepted
Updated to Android Studio 3.0
Please share missing items in comments.
A late answer but none of the answers here and here was right on the money for us...
So, here's our gitignore file:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
.navigation
captures/
output.json
#NDK
obj/
.externalNativeBuild
Since Android Studio 2.2 and up to 3.0, new projects are created with this gitignore file:
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
Deprecated - for older project format, add this section to your gitignore file:
/*/out
/*/*/build
/*/*/production
*.iws
*.ipr
*~
*.swp
This file should be located in the project's root folder and not inside the project's module folder.
Edit Notes:
Since version 0.3+ it seems you can commit and push *.iml and build.gradle files. If your project is based on Gradle: in the new open/import dialog, you should check the
"use auto import"
checkbox and mark the"use default gradle wrapper (recommended)"
radio button. All paths are now relative as @George suggested.Updated answer according to @128KB attached source and @Skela suggestions
Updated to Android Studio 3.0
Please share missing items in comments.
A late answer but none of the answers here and here was right on the money for us...
So, here's our gitignore file:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
.navigation
captures/
output.json
#NDK
obj/
.externalNativeBuild
Since Android Studio 2.2 and up to 3.0, new projects are created with this gitignore file:
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
Deprecated - for older project format, add this section to your gitignore file:
/*/out
/*/*/build
/*/*/production
*.iws
*.ipr
*~
*.swp
This file should be located in the project's root folder and not inside the project's module folder.
Edit Notes:
Since version 0.3+ it seems you can commit and push *.iml and build.gradle files. If your project is based on Gradle: in the new open/import dialog, you should check the
"use auto import"
checkbox and mark the"use default gradle wrapper (recommended)"
radio button. All paths are now relative as @George suggested.Updated answer according to @128KB attached source and @Skela suggestions
edited Dec 12 '17 at 6:36
answered Jul 23 '13 at 7:29
Lior Iluz
19.1k125499
19.1k125499
5
Why do we have to import the project and manually add libs and module dependencies? Is there any way to preserve those things in the repo and when we clone the repo just do a project open?
– Justin
Aug 20 '13 at 5:52
10
The proper way to do this is to check in the *.iml and *.ipr files, and just open them in the IDE. Why force other people on your team to recreate these files, and why allow them to use possibly incorrect settings (such as sdk version)?
– Sky Kelsey
Aug 26 '13 at 22:36
18
@liorry , I disagree. This is the first answer other people will see, and it is massively up-voted. Due to all the things you need to do to get a project up and running after a fresh clone from git using this particular .gitignore I strongly feel this is not what most people would need. Although I guess the number of up-votes tells me otherwise, but I still don't agree. At the very least, perhaps some information stating that you most likely will have to set the project up again and it won't work out-of-the-box.
– Skela
Mar 10 '14 at 14:31
9
@liorry, I don't mean to be rude or anything mate, please don't take it personally. The issue is, these things need to work with minimal amount of setup to be of any practical use. When you need to Import the project, and manually add module dependancies its immediately entered a realm of lunacy. When you are familiar with a project, and know these things inside-out, then there is no issue with your approach. But for a developer who is cloning the project for the first time, its just not that practical. I really am just trying to make sure that your approach does not become the norm thats all.
– Skela
Mar 12 '14 at 8:45
14
You should not version the.iml
files unless you wan't to deal with unneeded annoyances if other users name the project differently when they check out.
– theblang
Feb 26 '15 at 20:35
|
show 53 more comments
5
Why do we have to import the project and manually add libs and module dependencies? Is there any way to preserve those things in the repo and when we clone the repo just do a project open?
– Justin
Aug 20 '13 at 5:52
10
The proper way to do this is to check in the *.iml and *.ipr files, and just open them in the IDE. Why force other people on your team to recreate these files, and why allow them to use possibly incorrect settings (such as sdk version)?
– Sky Kelsey
Aug 26 '13 at 22:36
18
@liorry , I disagree. This is the first answer other people will see, and it is massively up-voted. Due to all the things you need to do to get a project up and running after a fresh clone from git using this particular .gitignore I strongly feel this is not what most people would need. Although I guess the number of up-votes tells me otherwise, but I still don't agree. At the very least, perhaps some information stating that you most likely will have to set the project up again and it won't work out-of-the-box.
– Skela
Mar 10 '14 at 14:31
9
@liorry, I don't mean to be rude or anything mate, please don't take it personally. The issue is, these things need to work with minimal amount of setup to be of any practical use. When you need to Import the project, and manually add module dependancies its immediately entered a realm of lunacy. When you are familiar with a project, and know these things inside-out, then there is no issue with your approach. But for a developer who is cloning the project for the first time, its just not that practical. I really am just trying to make sure that your approach does not become the norm thats all.
– Skela
Mar 12 '14 at 8:45
14
You should not version the.iml
files unless you wan't to deal with unneeded annoyances if other users name the project differently when they check out.
– theblang
Feb 26 '15 at 20:35
5
5
Why do we have to import the project and manually add libs and module dependencies? Is there any way to preserve those things in the repo and when we clone the repo just do a project open?
– Justin
Aug 20 '13 at 5:52
Why do we have to import the project and manually add libs and module dependencies? Is there any way to preserve those things in the repo and when we clone the repo just do a project open?
– Justin
Aug 20 '13 at 5:52
10
10
The proper way to do this is to check in the *.iml and *.ipr files, and just open them in the IDE. Why force other people on your team to recreate these files, and why allow them to use possibly incorrect settings (such as sdk version)?
– Sky Kelsey
Aug 26 '13 at 22:36
The proper way to do this is to check in the *.iml and *.ipr files, and just open them in the IDE. Why force other people on your team to recreate these files, and why allow them to use possibly incorrect settings (such as sdk version)?
– Sky Kelsey
Aug 26 '13 at 22:36
18
18
@liorry , I disagree. This is the first answer other people will see, and it is massively up-voted. Due to all the things you need to do to get a project up and running after a fresh clone from git using this particular .gitignore I strongly feel this is not what most people would need. Although I guess the number of up-votes tells me otherwise, but I still don't agree. At the very least, perhaps some information stating that you most likely will have to set the project up again and it won't work out-of-the-box.
– Skela
Mar 10 '14 at 14:31
@liorry , I disagree. This is the first answer other people will see, and it is massively up-voted. Due to all the things you need to do to get a project up and running after a fresh clone from git using this particular .gitignore I strongly feel this is not what most people would need. Although I guess the number of up-votes tells me otherwise, but I still don't agree. At the very least, perhaps some information stating that you most likely will have to set the project up again and it won't work out-of-the-box.
– Skela
Mar 10 '14 at 14:31
9
9
@liorry, I don't mean to be rude or anything mate, please don't take it personally. The issue is, these things need to work with minimal amount of setup to be of any practical use. When you need to Import the project, and manually add module dependancies its immediately entered a realm of lunacy. When you are familiar with a project, and know these things inside-out, then there is no issue with your approach. But for a developer who is cloning the project for the first time, its just not that practical. I really am just trying to make sure that your approach does not become the norm thats all.
– Skela
Mar 12 '14 at 8:45
@liorry, I don't mean to be rude or anything mate, please don't take it personally. The issue is, these things need to work with minimal amount of setup to be of any practical use. When you need to Import the project, and manually add module dependancies its immediately entered a realm of lunacy. When you are familiar with a project, and know these things inside-out, then there is no issue with your approach. But for a developer who is cloning the project for the first time, its just not that practical. I really am just trying to make sure that your approach does not become the norm thats all.
– Skela
Mar 12 '14 at 8:45
14
14
You should not version the
.iml
files unless you wan't to deal with unneeded annoyances if other users name the project differently when they check out.– theblang
Feb 26 '15 at 20:35
You should not version the
.iml
files unless you wan't to deal with unneeded annoyances if other users name the project differently when they check out.– theblang
Feb 26 '15 at 20:35
|
show 53 more comments
up vote
141
down vote
Building on my normal Android .gitignore, and after reading through documentation on the Intellij IDEA website and reading posts on StackOverflow, I have constructed the following file:
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# built native files (uncomment if you build your own)
# *.o
# *.so
# generated files
bin/
gen/
# Ignore gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Eclipse Metadata
.metadata/
# Mac OS X clutter
*.DS_Store
# Windows clutter
Thumbs.db
# Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067)
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
Also note that as pointed out, the built native files section is primarily useful when you are building your own native code with the Android NDK. If, on the other hand, you are using a third party library that includes these files, you may wish to remove these lines (*.o and *.so) from your .gitignore.
10
Almost right. I don't think its a good idea to ignore *.so because you won't be able to work with projects that have linked dependancies on NDK libraries. But a very good starting point by all accounts!
– Skela
Mar 12 '14 at 8:47
@Skela good point. I had these in there from when I was building my own native files - but I have also worked on projects that require a simple copy and paste of pre-built files. I added a note about this to the answer above.
– Phil
Mar 12 '14 at 13:36
@Phil Do you have any opinions about the XML files in.idea/libraries
? Should they be shared or excluded in your opinion?
– Alex Lockwood
May 29 '14 at 18:25
1
@AlexLockwood I think these files should be included if the project is not dependent on another project or module. If, however, the project is dependent on a module that contains the libraries, then this file should be ignored at the project level, but not by the module.
– Phil
May 29 '14 at 18:35
@Phil very cool and I have used this so far but a dex file slips through the cracks: /moduledirectory/build/intermediates/dex-cache/cache.xml - wouldn't it make sense to add **/build in order to exclude the build folders in the modules as well?
– Oliver Hausler
Nov 30 '14 at 17:18
|
show 6 more comments
up vote
141
down vote
Building on my normal Android .gitignore, and after reading through documentation on the Intellij IDEA website and reading posts on StackOverflow, I have constructed the following file:
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# built native files (uncomment if you build your own)
# *.o
# *.so
# generated files
bin/
gen/
# Ignore gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Eclipse Metadata
.metadata/
# Mac OS X clutter
*.DS_Store
# Windows clutter
Thumbs.db
# Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067)
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
Also note that as pointed out, the built native files section is primarily useful when you are building your own native code with the Android NDK. If, on the other hand, you are using a third party library that includes these files, you may wish to remove these lines (*.o and *.so) from your .gitignore.
10
Almost right. I don't think its a good idea to ignore *.so because you won't be able to work with projects that have linked dependancies on NDK libraries. But a very good starting point by all accounts!
– Skela
Mar 12 '14 at 8:47
@Skela good point. I had these in there from when I was building my own native files - but I have also worked on projects that require a simple copy and paste of pre-built files. I added a note about this to the answer above.
– Phil
Mar 12 '14 at 13:36
@Phil Do you have any opinions about the XML files in.idea/libraries
? Should they be shared or excluded in your opinion?
– Alex Lockwood
May 29 '14 at 18:25
1
@AlexLockwood I think these files should be included if the project is not dependent on another project or module. If, however, the project is dependent on a module that contains the libraries, then this file should be ignored at the project level, but not by the module.
– Phil
May 29 '14 at 18:35
@Phil very cool and I have used this so far but a dex file slips through the cracks: /moduledirectory/build/intermediates/dex-cache/cache.xml - wouldn't it make sense to add **/build in order to exclude the build folders in the modules as well?
– Oliver Hausler
Nov 30 '14 at 17:18
|
show 6 more comments
up vote
141
down vote
up vote
141
down vote
Building on my normal Android .gitignore, and after reading through documentation on the Intellij IDEA website and reading posts on StackOverflow, I have constructed the following file:
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# built native files (uncomment if you build your own)
# *.o
# *.so
# generated files
bin/
gen/
# Ignore gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Eclipse Metadata
.metadata/
# Mac OS X clutter
*.DS_Store
# Windows clutter
Thumbs.db
# Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067)
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
Also note that as pointed out, the built native files section is primarily useful when you are building your own native code with the Android NDK. If, on the other hand, you are using a third party library that includes these files, you may wish to remove these lines (*.o and *.so) from your .gitignore.
Building on my normal Android .gitignore, and after reading through documentation on the Intellij IDEA website and reading posts on StackOverflow, I have constructed the following file:
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# built native files (uncomment if you build your own)
# *.o
# *.so
# generated files
bin/
gen/
# Ignore gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Eclipse Metadata
.metadata/
# Mac OS X clutter
*.DS_Store
# Windows clutter
Thumbs.db
# Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067)
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
Also note that as pointed out, the built native files section is primarily useful when you are building your own native code with the Android NDK. If, on the other hand, you are using a third party library that includes these files, you may wish to remove these lines (*.o and *.so) from your .gitignore.
edited Nov 28 '15 at 21:12
hichris123
7,410114261
7,410114261
answered Jan 10 '14 at 16:23
Phil
26.7k20104146
26.7k20104146
10
Almost right. I don't think its a good idea to ignore *.so because you won't be able to work with projects that have linked dependancies on NDK libraries. But a very good starting point by all accounts!
– Skela
Mar 12 '14 at 8:47
@Skela good point. I had these in there from when I was building my own native files - but I have also worked on projects that require a simple copy and paste of pre-built files. I added a note about this to the answer above.
– Phil
Mar 12 '14 at 13:36
@Phil Do you have any opinions about the XML files in.idea/libraries
? Should they be shared or excluded in your opinion?
– Alex Lockwood
May 29 '14 at 18:25
1
@AlexLockwood I think these files should be included if the project is not dependent on another project or module. If, however, the project is dependent on a module that contains the libraries, then this file should be ignored at the project level, but not by the module.
– Phil
May 29 '14 at 18:35
@Phil very cool and I have used this so far but a dex file slips through the cracks: /moduledirectory/build/intermediates/dex-cache/cache.xml - wouldn't it make sense to add **/build in order to exclude the build folders in the modules as well?
– Oliver Hausler
Nov 30 '14 at 17:18
|
show 6 more comments
10
Almost right. I don't think its a good idea to ignore *.so because you won't be able to work with projects that have linked dependancies on NDK libraries. But a very good starting point by all accounts!
– Skela
Mar 12 '14 at 8:47
@Skela good point. I had these in there from when I was building my own native files - but I have also worked on projects that require a simple copy and paste of pre-built files. I added a note about this to the answer above.
– Phil
Mar 12 '14 at 13:36
@Phil Do you have any opinions about the XML files in.idea/libraries
? Should they be shared or excluded in your opinion?
– Alex Lockwood
May 29 '14 at 18:25
1
@AlexLockwood I think these files should be included if the project is not dependent on another project or module. If, however, the project is dependent on a module that contains the libraries, then this file should be ignored at the project level, but not by the module.
– Phil
May 29 '14 at 18:35
@Phil very cool and I have used this so far but a dex file slips through the cracks: /moduledirectory/build/intermediates/dex-cache/cache.xml - wouldn't it make sense to add **/build in order to exclude the build folders in the modules as well?
– Oliver Hausler
Nov 30 '14 at 17:18
10
10
Almost right. I don't think its a good idea to ignore *.so because you won't be able to work with projects that have linked dependancies on NDK libraries. But a very good starting point by all accounts!
– Skela
Mar 12 '14 at 8:47
Almost right. I don't think its a good idea to ignore *.so because you won't be able to work with projects that have linked dependancies on NDK libraries. But a very good starting point by all accounts!
– Skela
Mar 12 '14 at 8:47
@Skela good point. I had these in there from when I was building my own native files - but I have also worked on projects that require a simple copy and paste of pre-built files. I added a note about this to the answer above.
– Phil
Mar 12 '14 at 13:36
@Skela good point. I had these in there from when I was building my own native files - but I have also worked on projects that require a simple copy and paste of pre-built files. I added a note about this to the answer above.
– Phil
Mar 12 '14 at 13:36
@Phil Do you have any opinions about the XML files in
.idea/libraries
? Should they be shared or excluded in your opinion?– Alex Lockwood
May 29 '14 at 18:25
@Phil Do you have any opinions about the XML files in
.idea/libraries
? Should they be shared or excluded in your opinion?– Alex Lockwood
May 29 '14 at 18:25
1
1
@AlexLockwood I think these files should be included if the project is not dependent on another project or module. If, however, the project is dependent on a module that contains the libraries, then this file should be ignored at the project level, but not by the module.
– Phil
May 29 '14 at 18:35
@AlexLockwood I think these files should be included if the project is not dependent on another project or module. If, however, the project is dependent on a module that contains the libraries, then this file should be ignored at the project level, but not by the module.
– Phil
May 29 '14 at 18:35
@Phil very cool and I have used this so far but a dex file slips through the cracks: /moduledirectory/build/intermediates/dex-cache/cache.xml - wouldn't it make sense to add **/build in order to exclude the build folders in the modules as well?
– Oliver Hausler
Nov 30 '14 at 17:18
@Phil very cool and I have used this so far but a dex file slips through the cracks: /moduledirectory/build/intermediates/dex-cache/cache.xml - wouldn't it make sense to add **/build in order to exclude the build folders in the modules as well?
– Oliver Hausler
Nov 30 '14 at 17:18
|
show 6 more comments
up vote
74
down vote
Updated 7/2015:
Here is the definitive source from JetBrains
Directory based project format (.idea directory)
This format is used by all the recent IDE versions by default. Here is what you need to share:
- All the files under
.idea
directory in the project root except theworkspace.xml
andtasks.xml
files which store user specific settings - All the
.iml
module files that can be located in different module directories (applies to IntelliJ IDEA)
Be careful about sharing the following:
- Android artifacts that produce a signed build (will contain keystore passwords)
- In IDEA 13 and earlier
dataSources.ids
,datasources.xml
can contain database passwords. IDEA 14 solves this problem.
You may consider not to share the following:
- gradle.xml file, see this discussion
- user dictionaries folder (to avoid conflicts if other developer has the same name)
- XML files under
.idea/libraries
in case they are generated from Gradle project
Legacy project format (.ipr
/.iml
/.iws
files)
- Share the project
.ipr
file and all the.iml
module files, don't share the.iws
file as it stores user specific settings
While these instructions are for IntelliJ IDEA, they hold true 100% for Android Studio.
Here is a .gitignore
snippet that incorporates all of the above rules:
# Android Studio / IntelliJ IDEA
*.iws
.idea/libraries
.idea/tasks.xml
.idea/vcs.xml
.idea/workspace.xml
Which SDKs are supported is defined in the AndroidManifest.xml (and also by Gradle). Any SDK allowed by that setting must be ok for development. Concerning code styles: this is not something that has to be maintained in each project separately, and moreover it should be clarified independent of the IDE. Copyright headers: hopefully, these are in your code base and not in any IDE project files. Otherwise building on the commandline would simply not include them...
– Risadinha
Oct 8 '13 at 10:31
@Risadinha 1) SDKs are defined at the IDE level as well. They are referenced in the Manifest, but the project file contains the actual SDK definitions. 2) Code style should be maintained AT LEAST at the project level. Ideally, everyone would write standard Java, but oh well. 3) Copyright headers are stored in the project. They are used for new file creation, and can contain macros for name, company name, project, date, etc. I recommend you check them out! In summary, the project files contain important meta information about the project that needs to be shared and controlled across the team.
– Sky Kelsey
Oct 8 '13 at 19:18
2
A maintainer has pulled the changes to his own repo. It'll probably be pulled into master soon.
– FalconC
Nov 8 '13 at 21:22
5
JetBrains has deprecated DOC-1186 and put their updated recommendations in a new post: DO INCLUDE: All the files under .idea directory in the project root except the workspace.xml and tasks.xml, and all the .iml files. BE CAREFUL when sharing Android artifacts that produce a signed build (will contain keystore passwords), dataSources.ids and datasources.xml (they may contain passwords). CONSIDER EXCLUDING: gradle.xml, user dictionaries folder, and XML files under .idea/libraries (in case they are generated from Gradle project).
– JSmitty
Feb 5 '14 at 3:07
2
That's a lovely theory but this simply doesn't work for us. We consistently end up with .iml files with entries like this:<orderEntry type="jdk" jdkName="1.6 (38)" jdkType="JavaSDK" />
Notice the number 38 that seems to constantly be being incremented. (the misc.xml file also has this trouble).
– Sam
Jul 9 '14 at 16:38
|
show 5 more comments
up vote
74
down vote
Updated 7/2015:
Here is the definitive source from JetBrains
Directory based project format (.idea directory)
This format is used by all the recent IDE versions by default. Here is what you need to share:
- All the files under
.idea
directory in the project root except theworkspace.xml
andtasks.xml
files which store user specific settings - All the
.iml
module files that can be located in different module directories (applies to IntelliJ IDEA)
Be careful about sharing the following:
- Android artifacts that produce a signed build (will contain keystore passwords)
- In IDEA 13 and earlier
dataSources.ids
,datasources.xml
can contain database passwords. IDEA 14 solves this problem.
You may consider not to share the following:
- gradle.xml file, see this discussion
- user dictionaries folder (to avoid conflicts if other developer has the same name)
- XML files under
.idea/libraries
in case they are generated from Gradle project
Legacy project format (.ipr
/.iml
/.iws
files)
- Share the project
.ipr
file and all the.iml
module files, don't share the.iws
file as it stores user specific settings
While these instructions are for IntelliJ IDEA, they hold true 100% for Android Studio.
Here is a .gitignore
snippet that incorporates all of the above rules:
# Android Studio / IntelliJ IDEA
*.iws
.idea/libraries
.idea/tasks.xml
.idea/vcs.xml
.idea/workspace.xml
Which SDKs are supported is defined in the AndroidManifest.xml (and also by Gradle). Any SDK allowed by that setting must be ok for development. Concerning code styles: this is not something that has to be maintained in each project separately, and moreover it should be clarified independent of the IDE. Copyright headers: hopefully, these are in your code base and not in any IDE project files. Otherwise building on the commandline would simply not include them...
– Risadinha
Oct 8 '13 at 10:31
@Risadinha 1) SDKs are defined at the IDE level as well. They are referenced in the Manifest, but the project file contains the actual SDK definitions. 2) Code style should be maintained AT LEAST at the project level. Ideally, everyone would write standard Java, but oh well. 3) Copyright headers are stored in the project. They are used for new file creation, and can contain macros for name, company name, project, date, etc. I recommend you check them out! In summary, the project files contain important meta information about the project that needs to be shared and controlled across the team.
– Sky Kelsey
Oct 8 '13 at 19:18
2
A maintainer has pulled the changes to his own repo. It'll probably be pulled into master soon.
– FalconC
Nov 8 '13 at 21:22
5
JetBrains has deprecated DOC-1186 and put their updated recommendations in a new post: DO INCLUDE: All the files under .idea directory in the project root except the workspace.xml and tasks.xml, and all the .iml files. BE CAREFUL when sharing Android artifacts that produce a signed build (will contain keystore passwords), dataSources.ids and datasources.xml (they may contain passwords). CONSIDER EXCLUDING: gradle.xml, user dictionaries folder, and XML files under .idea/libraries (in case they are generated from Gradle project).
– JSmitty
Feb 5 '14 at 3:07
2
That's a lovely theory but this simply doesn't work for us. We consistently end up with .iml files with entries like this:<orderEntry type="jdk" jdkName="1.6 (38)" jdkType="JavaSDK" />
Notice the number 38 that seems to constantly be being incremented. (the misc.xml file also has this trouble).
– Sam
Jul 9 '14 at 16:38
|
show 5 more comments
up vote
74
down vote
up vote
74
down vote
Updated 7/2015:
Here is the definitive source from JetBrains
Directory based project format (.idea directory)
This format is used by all the recent IDE versions by default. Here is what you need to share:
- All the files under
.idea
directory in the project root except theworkspace.xml
andtasks.xml
files which store user specific settings - All the
.iml
module files that can be located in different module directories (applies to IntelliJ IDEA)
Be careful about sharing the following:
- Android artifacts that produce a signed build (will contain keystore passwords)
- In IDEA 13 and earlier
dataSources.ids
,datasources.xml
can contain database passwords. IDEA 14 solves this problem.
You may consider not to share the following:
- gradle.xml file, see this discussion
- user dictionaries folder (to avoid conflicts if other developer has the same name)
- XML files under
.idea/libraries
in case they are generated from Gradle project
Legacy project format (.ipr
/.iml
/.iws
files)
- Share the project
.ipr
file and all the.iml
module files, don't share the.iws
file as it stores user specific settings
While these instructions are for IntelliJ IDEA, they hold true 100% for Android Studio.
Here is a .gitignore
snippet that incorporates all of the above rules:
# Android Studio / IntelliJ IDEA
*.iws
.idea/libraries
.idea/tasks.xml
.idea/vcs.xml
.idea/workspace.xml
Updated 7/2015:
Here is the definitive source from JetBrains
Directory based project format (.idea directory)
This format is used by all the recent IDE versions by default. Here is what you need to share:
- All the files under
.idea
directory in the project root except theworkspace.xml
andtasks.xml
files which store user specific settings - All the
.iml
module files that can be located in different module directories (applies to IntelliJ IDEA)
Be careful about sharing the following:
- Android artifacts that produce a signed build (will contain keystore passwords)
- In IDEA 13 and earlier
dataSources.ids
,datasources.xml
can contain database passwords. IDEA 14 solves this problem.
You may consider not to share the following:
- gradle.xml file, see this discussion
- user dictionaries folder (to avoid conflicts if other developer has the same name)
- XML files under
.idea/libraries
in case they are generated from Gradle project
Legacy project format (.ipr
/.iml
/.iws
files)
- Share the project
.ipr
file and all the.iml
module files, don't share the.iws
file as it stores user specific settings
While these instructions are for IntelliJ IDEA, they hold true 100% for Android Studio.
Here is a .gitignore
snippet that incorporates all of the above rules:
# Android Studio / IntelliJ IDEA
*.iws
.idea/libraries
.idea/tasks.xml
.idea/vcs.xml
.idea/workspace.xml
edited Jul 14 '15 at 1:21
answered Aug 26 '13 at 22:45
Sky Kelsey
12.8k42563
12.8k42563
Which SDKs are supported is defined in the AndroidManifest.xml (and also by Gradle). Any SDK allowed by that setting must be ok for development. Concerning code styles: this is not something that has to be maintained in each project separately, and moreover it should be clarified independent of the IDE. Copyright headers: hopefully, these are in your code base and not in any IDE project files. Otherwise building on the commandline would simply not include them...
– Risadinha
Oct 8 '13 at 10:31
@Risadinha 1) SDKs are defined at the IDE level as well. They are referenced in the Manifest, but the project file contains the actual SDK definitions. 2) Code style should be maintained AT LEAST at the project level. Ideally, everyone would write standard Java, but oh well. 3) Copyright headers are stored in the project. They are used for new file creation, and can contain macros for name, company name, project, date, etc. I recommend you check them out! In summary, the project files contain important meta information about the project that needs to be shared and controlled across the team.
– Sky Kelsey
Oct 8 '13 at 19:18
2
A maintainer has pulled the changes to his own repo. It'll probably be pulled into master soon.
– FalconC
Nov 8 '13 at 21:22
5
JetBrains has deprecated DOC-1186 and put their updated recommendations in a new post: DO INCLUDE: All the files under .idea directory in the project root except the workspace.xml and tasks.xml, and all the .iml files. BE CAREFUL when sharing Android artifacts that produce a signed build (will contain keystore passwords), dataSources.ids and datasources.xml (they may contain passwords). CONSIDER EXCLUDING: gradle.xml, user dictionaries folder, and XML files under .idea/libraries (in case they are generated from Gradle project).
– JSmitty
Feb 5 '14 at 3:07
2
That's a lovely theory but this simply doesn't work for us. We consistently end up with .iml files with entries like this:<orderEntry type="jdk" jdkName="1.6 (38)" jdkType="JavaSDK" />
Notice the number 38 that seems to constantly be being incremented. (the misc.xml file also has this trouble).
– Sam
Jul 9 '14 at 16:38
|
show 5 more comments
Which SDKs are supported is defined in the AndroidManifest.xml (and also by Gradle). Any SDK allowed by that setting must be ok for development. Concerning code styles: this is not something that has to be maintained in each project separately, and moreover it should be clarified independent of the IDE. Copyright headers: hopefully, these are in your code base and not in any IDE project files. Otherwise building on the commandline would simply not include them...
– Risadinha
Oct 8 '13 at 10:31
@Risadinha 1) SDKs are defined at the IDE level as well. They are referenced in the Manifest, but the project file contains the actual SDK definitions. 2) Code style should be maintained AT LEAST at the project level. Ideally, everyone would write standard Java, but oh well. 3) Copyright headers are stored in the project. They are used for new file creation, and can contain macros for name, company name, project, date, etc. I recommend you check them out! In summary, the project files contain important meta information about the project that needs to be shared and controlled across the team.
– Sky Kelsey
Oct 8 '13 at 19:18
2
A maintainer has pulled the changes to his own repo. It'll probably be pulled into master soon.
– FalconC
Nov 8 '13 at 21:22
5
JetBrains has deprecated DOC-1186 and put their updated recommendations in a new post: DO INCLUDE: All the files under .idea directory in the project root except the workspace.xml and tasks.xml, and all the .iml files. BE CAREFUL when sharing Android artifacts that produce a signed build (will contain keystore passwords), dataSources.ids and datasources.xml (they may contain passwords). CONSIDER EXCLUDING: gradle.xml, user dictionaries folder, and XML files under .idea/libraries (in case they are generated from Gradle project).
– JSmitty
Feb 5 '14 at 3:07
2
That's a lovely theory but this simply doesn't work for us. We consistently end up with .iml files with entries like this:<orderEntry type="jdk" jdkName="1.6 (38)" jdkType="JavaSDK" />
Notice the number 38 that seems to constantly be being incremented. (the misc.xml file also has this trouble).
– Sam
Jul 9 '14 at 16:38
Which SDKs are supported is defined in the AndroidManifest.xml (and also by Gradle). Any SDK allowed by that setting must be ok for development. Concerning code styles: this is not something that has to be maintained in each project separately, and moreover it should be clarified independent of the IDE. Copyright headers: hopefully, these are in your code base and not in any IDE project files. Otherwise building on the commandline would simply not include them...
– Risadinha
Oct 8 '13 at 10:31
Which SDKs are supported is defined in the AndroidManifest.xml (and also by Gradle). Any SDK allowed by that setting must be ok for development. Concerning code styles: this is not something that has to be maintained in each project separately, and moreover it should be clarified independent of the IDE. Copyright headers: hopefully, these are in your code base and not in any IDE project files. Otherwise building on the commandline would simply not include them...
– Risadinha
Oct 8 '13 at 10:31
@Risadinha 1) SDKs are defined at the IDE level as well. They are referenced in the Manifest, but the project file contains the actual SDK definitions. 2) Code style should be maintained AT LEAST at the project level. Ideally, everyone would write standard Java, but oh well. 3) Copyright headers are stored in the project. They are used for new file creation, and can contain macros for name, company name, project, date, etc. I recommend you check them out! In summary, the project files contain important meta information about the project that needs to be shared and controlled across the team.
– Sky Kelsey
Oct 8 '13 at 19:18
@Risadinha 1) SDKs are defined at the IDE level as well. They are referenced in the Manifest, but the project file contains the actual SDK definitions. 2) Code style should be maintained AT LEAST at the project level. Ideally, everyone would write standard Java, but oh well. 3) Copyright headers are stored in the project. They are used for new file creation, and can contain macros for name, company name, project, date, etc. I recommend you check them out! In summary, the project files contain important meta information about the project that needs to be shared and controlled across the team.
– Sky Kelsey
Oct 8 '13 at 19:18
2
2
A maintainer has pulled the changes to his own repo. It'll probably be pulled into master soon.
– FalconC
Nov 8 '13 at 21:22
A maintainer has pulled the changes to his own repo. It'll probably be pulled into master soon.
– FalconC
Nov 8 '13 at 21:22
5
5
JetBrains has deprecated DOC-1186 and put their updated recommendations in a new post: DO INCLUDE: All the files under .idea directory in the project root except the workspace.xml and tasks.xml, and all the .iml files. BE CAREFUL when sharing Android artifacts that produce a signed build (will contain keystore passwords), dataSources.ids and datasources.xml (they may contain passwords). CONSIDER EXCLUDING: gradle.xml, user dictionaries folder, and XML files under .idea/libraries (in case they are generated from Gradle project).
– JSmitty
Feb 5 '14 at 3:07
JetBrains has deprecated DOC-1186 and put their updated recommendations in a new post: DO INCLUDE: All the files under .idea directory in the project root except the workspace.xml and tasks.xml, and all the .iml files. BE CAREFUL when sharing Android artifacts that produce a signed build (will contain keystore passwords), dataSources.ids and datasources.xml (they may contain passwords). CONSIDER EXCLUDING: gradle.xml, user dictionaries folder, and XML files under .idea/libraries (in case they are generated from Gradle project).
– JSmitty
Feb 5 '14 at 3:07
2
2
That's a lovely theory but this simply doesn't work for us. We consistently end up with .iml files with entries like this:
<orderEntry type="jdk" jdkName="1.6 (38)" jdkType="JavaSDK" />
Notice the number 38 that seems to constantly be being incremented. (the misc.xml file also has this trouble).– Sam
Jul 9 '14 at 16:38
That's a lovely theory but this simply doesn't work for us. We consistently end up with .iml files with entries like this:
<orderEntry type="jdk" jdkName="1.6 (38)" jdkType="JavaSDK" />
Notice the number 38 that seems to constantly be being incremented. (the misc.xml file also has this trouble).– Sam
Jul 9 '14 at 16:38
|
show 5 more comments
up vote
35
down vote
I disagree with all of these answers. The following configuration is working great for our organization's app.
I ignore:
/build
/.idea
(with possible exceptions, see comments in dalewking's answer)*.iml
local.properties
I think almost everyone agrees about /build
.
I got sick of constantly seeing messages about the various library.xml
files that Gradle creates or deletes in /.idea
. The build.gradle
will run on the developers's local when they first check out the project, so why do those XML files need to be versioned? Android Studio will also generate the rest of /.idea
when a developer creates a project using Check out from Version Control
, so why does anything in that folder need to be versioned?
If the *.iml
is versioned a new user will have to name the project exactly the same as it was when committed. Since this is also a generated file, why version it in the first place?
The local.properties
files points to an absolute path on the file system for the SDK, so it definitely shouldn't be versioned.
Edit 1: Added .gradle
to ignore the gradle caching stuff that should not be versioned (thanks Vasily Makarov).
Edit 2: Added .DS_Store
now that I am using Mac. This folder is Mac specific and should not be versioned.
Additional note: You probably also want to add a directory to put your signing keys in when building a release version.
For copy/paste convenience:
.gradle
/build
/.idea
*.iml
local.properties
.DS_Store
4
I agree with your answer. I also believe that neither the *.iml or .idea files should be versioned: stackoverflow.com/a/26290130/2948212
– iberodev
Oct 10 '14 at 0:37
6
My vote is for your gitignore as it is very much like mine. Couple suggestions: Usebuild/
instead of/build
to match module build dirs likeapp/build
. Use.gradle
to match gradle caching directory.
– Vasily Makarov
Apr 14 '15 at 9:15
I also question why the default gitignore lists /build instead of build/ I end up with all the files in app/build in my repository if I use /build
– guyland123
Apr 23 '15 at 21:40
@guyland123 I just noticed that I have another.gitignore
file in my app directory that also contains/build
. Is this auto generated, I can't remember? Sobuild/
will apply to subfolders?
– theblang
Apr 23 '15 at 21:52
@mattblang yes .gitignore is auto generated when you create a new project. It is not created however when you import a project from say Eclipse. build/ will match all directories named "build" beneath the location of the .gitignore file. Eg. app/build will be ignored.
– guyland123
Apr 24 '15 at 13:44
add a comment |
up vote
35
down vote
I disagree with all of these answers. The following configuration is working great for our organization's app.
I ignore:
/build
/.idea
(with possible exceptions, see comments in dalewking's answer)*.iml
local.properties
I think almost everyone agrees about /build
.
I got sick of constantly seeing messages about the various library.xml
files that Gradle creates or deletes in /.idea
. The build.gradle
will run on the developers's local when they first check out the project, so why do those XML files need to be versioned? Android Studio will also generate the rest of /.idea
when a developer creates a project using Check out from Version Control
, so why does anything in that folder need to be versioned?
If the *.iml
is versioned a new user will have to name the project exactly the same as it was when committed. Since this is also a generated file, why version it in the first place?
The local.properties
files points to an absolute path on the file system for the SDK, so it definitely shouldn't be versioned.
Edit 1: Added .gradle
to ignore the gradle caching stuff that should not be versioned (thanks Vasily Makarov).
Edit 2: Added .DS_Store
now that I am using Mac. This folder is Mac specific and should not be versioned.
Additional note: You probably also want to add a directory to put your signing keys in when building a release version.
For copy/paste convenience:
.gradle
/build
/.idea
*.iml
local.properties
.DS_Store
4
I agree with your answer. I also believe that neither the *.iml or .idea files should be versioned: stackoverflow.com/a/26290130/2948212
– iberodev
Oct 10 '14 at 0:37
6
My vote is for your gitignore as it is very much like mine. Couple suggestions: Usebuild/
instead of/build
to match module build dirs likeapp/build
. Use.gradle
to match gradle caching directory.
– Vasily Makarov
Apr 14 '15 at 9:15
I also question why the default gitignore lists /build instead of build/ I end up with all the files in app/build in my repository if I use /build
– guyland123
Apr 23 '15 at 21:40
@guyland123 I just noticed that I have another.gitignore
file in my app directory that also contains/build
. Is this auto generated, I can't remember? Sobuild/
will apply to subfolders?
– theblang
Apr 23 '15 at 21:52
@mattblang yes .gitignore is auto generated when you create a new project. It is not created however when you import a project from say Eclipse. build/ will match all directories named "build" beneath the location of the .gitignore file. Eg. app/build will be ignored.
– guyland123
Apr 24 '15 at 13:44
add a comment |
up vote
35
down vote
up vote
35
down vote
I disagree with all of these answers. The following configuration is working great for our organization's app.
I ignore:
/build
/.idea
(with possible exceptions, see comments in dalewking's answer)*.iml
local.properties
I think almost everyone agrees about /build
.
I got sick of constantly seeing messages about the various library.xml
files that Gradle creates or deletes in /.idea
. The build.gradle
will run on the developers's local when they first check out the project, so why do those XML files need to be versioned? Android Studio will also generate the rest of /.idea
when a developer creates a project using Check out from Version Control
, so why does anything in that folder need to be versioned?
If the *.iml
is versioned a new user will have to name the project exactly the same as it was when committed. Since this is also a generated file, why version it in the first place?
The local.properties
files points to an absolute path on the file system for the SDK, so it definitely shouldn't be versioned.
Edit 1: Added .gradle
to ignore the gradle caching stuff that should not be versioned (thanks Vasily Makarov).
Edit 2: Added .DS_Store
now that I am using Mac. This folder is Mac specific and should not be versioned.
Additional note: You probably also want to add a directory to put your signing keys in when building a release version.
For copy/paste convenience:
.gradle
/build
/.idea
*.iml
local.properties
.DS_Store
I disagree with all of these answers. The following configuration is working great for our organization's app.
I ignore:
/build
/.idea
(with possible exceptions, see comments in dalewking's answer)*.iml
local.properties
I think almost everyone agrees about /build
.
I got sick of constantly seeing messages about the various library.xml
files that Gradle creates or deletes in /.idea
. The build.gradle
will run on the developers's local when they first check out the project, so why do those XML files need to be versioned? Android Studio will also generate the rest of /.idea
when a developer creates a project using Check out from Version Control
, so why does anything in that folder need to be versioned?
If the *.iml
is versioned a new user will have to name the project exactly the same as it was when committed. Since this is also a generated file, why version it in the first place?
The local.properties
files points to an absolute path on the file system for the SDK, so it definitely shouldn't be versioned.
Edit 1: Added .gradle
to ignore the gradle caching stuff that should not be versioned (thanks Vasily Makarov).
Edit 2: Added .DS_Store
now that I am using Mac. This folder is Mac specific and should not be versioned.
Additional note: You probably also want to add a directory to put your signing keys in when building a release version.
For copy/paste convenience:
.gradle
/build
/.idea
*.iml
local.properties
.DS_Store
edited May 23 '17 at 12:34
Community♦
11
11
answered Jul 10 '14 at 14:57
theblang
6,920652100
6,920652100
4
I agree with your answer. I also believe that neither the *.iml or .idea files should be versioned: stackoverflow.com/a/26290130/2948212
– iberodev
Oct 10 '14 at 0:37
6
My vote is for your gitignore as it is very much like mine. Couple suggestions: Usebuild/
instead of/build
to match module build dirs likeapp/build
. Use.gradle
to match gradle caching directory.
– Vasily Makarov
Apr 14 '15 at 9:15
I also question why the default gitignore lists /build instead of build/ I end up with all the files in app/build in my repository if I use /build
– guyland123
Apr 23 '15 at 21:40
@guyland123 I just noticed that I have another.gitignore
file in my app directory that also contains/build
. Is this auto generated, I can't remember? Sobuild/
will apply to subfolders?
– theblang
Apr 23 '15 at 21:52
@mattblang yes .gitignore is auto generated when you create a new project. It is not created however when you import a project from say Eclipse. build/ will match all directories named "build" beneath the location of the .gitignore file. Eg. app/build will be ignored.
– guyland123
Apr 24 '15 at 13:44
add a comment |
4
I agree with your answer. I also believe that neither the *.iml or .idea files should be versioned: stackoverflow.com/a/26290130/2948212
– iberodev
Oct 10 '14 at 0:37
6
My vote is for your gitignore as it is very much like mine. Couple suggestions: Usebuild/
instead of/build
to match module build dirs likeapp/build
. Use.gradle
to match gradle caching directory.
– Vasily Makarov
Apr 14 '15 at 9:15
I also question why the default gitignore lists /build instead of build/ I end up with all the files in app/build in my repository if I use /build
– guyland123
Apr 23 '15 at 21:40
@guyland123 I just noticed that I have another.gitignore
file in my app directory that also contains/build
. Is this auto generated, I can't remember? Sobuild/
will apply to subfolders?
– theblang
Apr 23 '15 at 21:52
@mattblang yes .gitignore is auto generated when you create a new project. It is not created however when you import a project from say Eclipse. build/ will match all directories named "build" beneath the location of the .gitignore file. Eg. app/build will be ignored.
– guyland123
Apr 24 '15 at 13:44
4
4
I agree with your answer. I also believe that neither the *.iml or .idea files should be versioned: stackoverflow.com/a/26290130/2948212
– iberodev
Oct 10 '14 at 0:37
I agree with your answer. I also believe that neither the *.iml or .idea files should be versioned: stackoverflow.com/a/26290130/2948212
– iberodev
Oct 10 '14 at 0:37
6
6
My vote is for your gitignore as it is very much like mine. Couple suggestions: Use
build/
instead of /build
to match module build dirs like app/build
. Use .gradle
to match gradle caching directory.– Vasily Makarov
Apr 14 '15 at 9:15
My vote is for your gitignore as it is very much like mine. Couple suggestions: Use
build/
instead of /build
to match module build dirs like app/build
. Use .gradle
to match gradle caching directory.– Vasily Makarov
Apr 14 '15 at 9:15
I also question why the default gitignore lists /build instead of build/ I end up with all the files in app/build in my repository if I use /build
– guyland123
Apr 23 '15 at 21:40
I also question why the default gitignore lists /build instead of build/ I end up with all the files in app/build in my repository if I use /build
– guyland123
Apr 23 '15 at 21:40
@guyland123 I just noticed that I have another
.gitignore
file in my app directory that also contains /build
. Is this auto generated, I can't remember? So build/
will apply to subfolders?– theblang
Apr 23 '15 at 21:52
@guyland123 I just noticed that I have another
.gitignore
file in my app directory that also contains /build
. Is this auto generated, I can't remember? So build/
will apply to subfolders?– theblang
Apr 23 '15 at 21:52
@mattblang yes .gitignore is auto generated when you create a new project. It is not created however when you import a project from say Eclipse. build/ will match all directories named "build" beneath the location of the .gitignore file. Eg. app/build will be ignored.
– guyland123
Apr 24 '15 at 13:44
@mattblang yes .gitignore is auto generated when you create a new project. It is not created however when you import a project from say Eclipse. build/ will match all directories named "build" beneath the location of the .gitignore file. Eg. app/build will be ignored.
– guyland123
Apr 24 '15 at 13:44
add a comment |
up vote
33
down vote
I use this .gitignore. I found it at: http://th4t.net/android-studio-gitignore.html
*.iml
*.iws
*.ipr
.idea/
.gradle/
local.properties
*/build/
*~
*.swp
1
*/build/ is not ignoring unchanged files in my build directory. any ideas? @Solved: i had to add */*/build/ as my build folder was a couple of directories deep.
– speedynomads
Jul 19 '13 at 10:35
3
Just addingbuild
worked for me.
– Myxtic
Jul 22 '13 at 12:59
**/build worked for me
– Jonathan Lin
Jan 2 '14 at 7:18
1
how about .iml?
– Danail
Jul 2 '14 at 23:18
add a comment |
up vote
33
down vote
I use this .gitignore. I found it at: http://th4t.net/android-studio-gitignore.html
*.iml
*.iws
*.ipr
.idea/
.gradle/
local.properties
*/build/
*~
*.swp
1
*/build/ is not ignoring unchanged files in my build directory. any ideas? @Solved: i had to add */*/build/ as my build folder was a couple of directories deep.
– speedynomads
Jul 19 '13 at 10:35
3
Just addingbuild
worked for me.
– Myxtic
Jul 22 '13 at 12:59
**/build worked for me
– Jonathan Lin
Jan 2 '14 at 7:18
1
how about .iml?
– Danail
Jul 2 '14 at 23:18
add a comment |
up vote
33
down vote
up vote
33
down vote
I use this .gitignore. I found it at: http://th4t.net/android-studio-gitignore.html
*.iml
*.iws
*.ipr
.idea/
.gradle/
local.properties
*/build/
*~
*.swp
I use this .gitignore. I found it at: http://th4t.net/android-studio-gitignore.html
*.iml
*.iws
*.ipr
.idea/
.gradle/
local.properties
*/build/
*~
*.swp
answered May 21 '13 at 10:53
helbaroudy
797413
797413
1
*/build/ is not ignoring unchanged files in my build directory. any ideas? @Solved: i had to add */*/build/ as my build folder was a couple of directories deep.
– speedynomads
Jul 19 '13 at 10:35
3
Just addingbuild
worked for me.
– Myxtic
Jul 22 '13 at 12:59
**/build worked for me
– Jonathan Lin
Jan 2 '14 at 7:18
1
how about .iml?
– Danail
Jul 2 '14 at 23:18
add a comment |
1
*/build/ is not ignoring unchanged files in my build directory. any ideas? @Solved: i had to add */*/build/ as my build folder was a couple of directories deep.
– speedynomads
Jul 19 '13 at 10:35
3
Just addingbuild
worked for me.
– Myxtic
Jul 22 '13 at 12:59
**/build worked for me
– Jonathan Lin
Jan 2 '14 at 7:18
1
how about .iml?
– Danail
Jul 2 '14 at 23:18
1
1
*/build/ is not ignoring unchanged files in my build directory. any ideas? @Solved: i had to add */*/build/ as my build folder was a couple of directories deep.
– speedynomads
Jul 19 '13 at 10:35
*/build/ is not ignoring unchanged files in my build directory. any ideas? @Solved: i had to add */*/build/ as my build folder was a couple of directories deep.
– speedynomads
Jul 19 '13 at 10:35
3
3
Just adding
build
worked for me.– Myxtic
Jul 22 '13 at 12:59
Just adding
build
worked for me.– Myxtic
Jul 22 '13 at 12:59
**/build worked for me
– Jonathan Lin
Jan 2 '14 at 7:18
**/build worked for me
– Jonathan Lin
Jan 2 '14 at 7:18
1
1
how about .iml?
– Danail
Jul 2 '14 at 23:18
how about .iml?
– Danail
Jul 2 '14 at 23:18
add a comment |
up vote
32
down vote
In the case of Android Studio, the only files that are required to be saved in version control are the files required to build the application from the command line using gradle. So you can ignore:
- *.iml
- .idea
- build
However, if you save any IDE settings, such as custom code style settings, they get saved in the .idea folder. If you want those changes in version control, then you'd save the IDEA files as well (*.iml and .idea).
3
Thanks for explaining that. From what I have read if you are going to include .idea in your project you should ignore */.idea/workspace.xml and */.idea/tasks.xml
– respectTheCode
May 24 '13 at 15:58
15
do not ignore .idea folder for now. Gradle plugin doesn't have any 'gradle idea' task yet and import project in Android Studio is far from perfect now.
– robotoaster
May 30 '13 at 11:40
2
Also if you are working in a team consider ignoring local.properties because it contains the sdk path hardcoded.
– Calin
Jun 29 '13 at 16:24
@robotoaster, would you still recommend not ignoring the .idea folder?
– loeschg
Oct 30 '13 at 21:00
@Ioeschg no longer required. if you checkout clean git repo use Import New Project and it should work fine as long as build files are present.
– robotoaster
Nov 3 '13 at 17:01
add a comment |
up vote
32
down vote
In the case of Android Studio, the only files that are required to be saved in version control are the files required to build the application from the command line using gradle. So you can ignore:
- *.iml
- .idea
- build
However, if you save any IDE settings, such as custom code style settings, they get saved in the .idea folder. If you want those changes in version control, then you'd save the IDEA files as well (*.iml and .idea).
3
Thanks for explaining that. From what I have read if you are going to include .idea in your project you should ignore */.idea/workspace.xml and */.idea/tasks.xml
– respectTheCode
May 24 '13 at 15:58
15
do not ignore .idea folder for now. Gradle plugin doesn't have any 'gradle idea' task yet and import project in Android Studio is far from perfect now.
– robotoaster
May 30 '13 at 11:40
2
Also if you are working in a team consider ignoring local.properties because it contains the sdk path hardcoded.
– Calin
Jun 29 '13 at 16:24
@robotoaster, would you still recommend not ignoring the .idea folder?
– loeschg
Oct 30 '13 at 21:00
@Ioeschg no longer required. if you checkout clean git repo use Import New Project and it should work fine as long as build files are present.
– robotoaster
Nov 3 '13 at 17:01
add a comment |
up vote
32
down vote
up vote
32
down vote
In the case of Android Studio, the only files that are required to be saved in version control are the files required to build the application from the command line using gradle. So you can ignore:
- *.iml
- .idea
- build
However, if you save any IDE settings, such as custom code style settings, they get saved in the .idea folder. If you want those changes in version control, then you'd save the IDEA files as well (*.iml and .idea).
In the case of Android Studio, the only files that are required to be saved in version control are the files required to build the application from the command line using gradle. So you can ignore:
- *.iml
- .idea
- build
However, if you save any IDE settings, such as custom code style settings, they get saved in the .idea folder. If you want those changes in version control, then you'd save the IDEA files as well (*.iml and .idea).
answered May 24 '13 at 15:11
Siva Velusamy
2,213119
2,213119
3
Thanks for explaining that. From what I have read if you are going to include .idea in your project you should ignore */.idea/workspace.xml and */.idea/tasks.xml
– respectTheCode
May 24 '13 at 15:58
15
do not ignore .idea folder for now. Gradle plugin doesn't have any 'gradle idea' task yet and import project in Android Studio is far from perfect now.
– robotoaster
May 30 '13 at 11:40
2
Also if you are working in a team consider ignoring local.properties because it contains the sdk path hardcoded.
– Calin
Jun 29 '13 at 16:24
@robotoaster, would you still recommend not ignoring the .idea folder?
– loeschg
Oct 30 '13 at 21:00
@Ioeschg no longer required. if you checkout clean git repo use Import New Project and it should work fine as long as build files are present.
– robotoaster
Nov 3 '13 at 17:01
add a comment |
3
Thanks for explaining that. From what I have read if you are going to include .idea in your project you should ignore */.idea/workspace.xml and */.idea/tasks.xml
– respectTheCode
May 24 '13 at 15:58
15
do not ignore .idea folder for now. Gradle plugin doesn't have any 'gradle idea' task yet and import project in Android Studio is far from perfect now.
– robotoaster
May 30 '13 at 11:40
2
Also if you are working in a team consider ignoring local.properties because it contains the sdk path hardcoded.
– Calin
Jun 29 '13 at 16:24
@robotoaster, would you still recommend not ignoring the .idea folder?
– loeschg
Oct 30 '13 at 21:00
@Ioeschg no longer required. if you checkout clean git repo use Import New Project and it should work fine as long as build files are present.
– robotoaster
Nov 3 '13 at 17:01
3
3
Thanks for explaining that. From what I have read if you are going to include .idea in your project you should ignore */.idea/workspace.xml and */.idea/tasks.xml
– respectTheCode
May 24 '13 at 15:58
Thanks for explaining that. From what I have read if you are going to include .idea in your project you should ignore */.idea/workspace.xml and */.idea/tasks.xml
– respectTheCode
May 24 '13 at 15:58
15
15
do not ignore .idea folder for now. Gradle plugin doesn't have any 'gradle idea' task yet and import project in Android Studio is far from perfect now.
– robotoaster
May 30 '13 at 11:40
do not ignore .idea folder for now. Gradle plugin doesn't have any 'gradle idea' task yet and import project in Android Studio is far from perfect now.
– robotoaster
May 30 '13 at 11:40
2
2
Also if you are working in a team consider ignoring local.properties because it contains the sdk path hardcoded.
– Calin
Jun 29 '13 at 16:24
Also if you are working in a team consider ignoring local.properties because it contains the sdk path hardcoded.
– Calin
Jun 29 '13 at 16:24
@robotoaster, would you still recommend not ignoring the .idea folder?
– loeschg
Oct 30 '13 at 21:00
@robotoaster, would you still recommend not ignoring the .idea folder?
– loeschg
Oct 30 '13 at 21:00
@Ioeschg no longer required. if you checkout clean git repo use Import New Project and it should work fine as long as build files are present.
– robotoaster
Nov 3 '13 at 17:01
@Ioeschg no longer required. if you checkout clean git repo use Import New Project and it should work fine as long as build files are present.
– robotoaster
Nov 3 '13 at 17:01
add a comment |
up vote
16
down vote
My advise would be also to not ignore the .idea folder.
I've imported a Git-based Eclipse project to Android Studio and that went fine. Later, I wanted to import this project with Git (like the first time) to another machine with Android Studio, but that didn't worked. Android Studio did load all the files but wasn't able to "see" the project as a project. I only could open Git-files.
While importing the project for the first time (from Eclipse to Android Studio) my old .gitignore was overwritten and the new one looked like this:
- .idea/.name
- .idea/compiler.xml
- .idea/copyright/profiles_settings.xml
- .idea/encodings.xml
- .idea/libraries/libs.xml
- .idea/misc.xml
- .idea/modules.xml
- .idea/scopes/scope_settings.xml
- .idea/vcs.xml
- .idea/workspace.xml
So, I tried to use an empty gitignore and now it worked. The other Android Studio could load the files and the Project. I guess some files are not important (profiles_settings.xml)
for Git and importing but I am just happy it worked.
add a comment |
up vote
16
down vote
My advise would be also to not ignore the .idea folder.
I've imported a Git-based Eclipse project to Android Studio and that went fine. Later, I wanted to import this project with Git (like the first time) to another machine with Android Studio, but that didn't worked. Android Studio did load all the files but wasn't able to "see" the project as a project. I only could open Git-files.
While importing the project for the first time (from Eclipse to Android Studio) my old .gitignore was overwritten and the new one looked like this:
- .idea/.name
- .idea/compiler.xml
- .idea/copyright/profiles_settings.xml
- .idea/encodings.xml
- .idea/libraries/libs.xml
- .idea/misc.xml
- .idea/modules.xml
- .idea/scopes/scope_settings.xml
- .idea/vcs.xml
- .idea/workspace.xml
So, I tried to use an empty gitignore and now it worked. The other Android Studio could load the files and the Project. I guess some files are not important (profiles_settings.xml)
for Git and importing but I am just happy it worked.
add a comment |
up vote
16
down vote
up vote
16
down vote
My advise would be also to not ignore the .idea folder.
I've imported a Git-based Eclipse project to Android Studio and that went fine. Later, I wanted to import this project with Git (like the first time) to another machine with Android Studio, but that didn't worked. Android Studio did load all the files but wasn't able to "see" the project as a project. I only could open Git-files.
While importing the project for the first time (from Eclipse to Android Studio) my old .gitignore was overwritten and the new one looked like this:
- .idea/.name
- .idea/compiler.xml
- .idea/copyright/profiles_settings.xml
- .idea/encodings.xml
- .idea/libraries/libs.xml
- .idea/misc.xml
- .idea/modules.xml
- .idea/scopes/scope_settings.xml
- .idea/vcs.xml
- .idea/workspace.xml
So, I tried to use an empty gitignore and now it worked. The other Android Studio could load the files and the Project. I guess some files are not important (profiles_settings.xml)
for Git and importing but I am just happy it worked.
My advise would be also to not ignore the .idea folder.
I've imported a Git-based Eclipse project to Android Studio and that went fine. Later, I wanted to import this project with Git (like the first time) to another machine with Android Studio, but that didn't worked. Android Studio did load all the files but wasn't able to "see" the project as a project. I only could open Git-files.
While importing the project for the first time (from Eclipse to Android Studio) my old .gitignore was overwritten and the new one looked like this:
- .idea/.name
- .idea/compiler.xml
- .idea/copyright/profiles_settings.xml
- .idea/encodings.xml
- .idea/libraries/libs.xml
- .idea/misc.xml
- .idea/modules.xml
- .idea/scopes/scope_settings.xml
- .idea/vcs.xml
- .idea/workspace.xml
So, I tried to use an empty gitignore and now it worked. The other Android Studio could load the files and the Project. I guess some files are not important (profiles_settings.xml)
for Git and importing but I am just happy it worked.
edited May 19 at 15:28
Ashraf.Shk786
5161821
5161821
answered Jun 21 '13 at 0:35
Ingo
1693
1693
add a comment |
add a comment |
up vote
11
down vote
For Android Studio 3.0 projects use the following:
.gitignore
.gradle
.idea
*.iml
gradle.properties
local.properties
.DS_Store
build
Gradle project folder
The only thing that should be in your (Gradle) project folder after repository cloning is this structure (at least for the use cases I encountered so far):
/app
/gradle
.gitignore
build.gradle
build.properties
gradlew
gradle.bat
settings.gradle
1
Why should you keep binaries like gradlew and gradle.bat?
– Bilthon
Mar 24 '17 at 2:20
1
@Bilthon They are not binaries. They are gradle start-up scripts for Windows (gradle.bat) and Linux (gradlew).
– Willi Mentzel
Mar 24 '17 at 9:16
Ohh.. I see you're right, but aren't they autogenerated anyways?
– Bilthon
Mar 24 '17 at 21:32
2
@Bilthon Indeed, they are! They are generated with default options. If you change something, they should be included in your repository in order to build it properly when checking it out fresh. They are so small, it doesn't hurt to always keep them.
– Willi Mentzel
Mar 27 '17 at 12:05
add a comment |
up vote
11
down vote
For Android Studio 3.0 projects use the following:
.gitignore
.gradle
.idea
*.iml
gradle.properties
local.properties
.DS_Store
build
Gradle project folder
The only thing that should be in your (Gradle) project folder after repository cloning is this structure (at least for the use cases I encountered so far):
/app
/gradle
.gitignore
build.gradle
build.properties
gradlew
gradle.bat
settings.gradle
1
Why should you keep binaries like gradlew and gradle.bat?
– Bilthon
Mar 24 '17 at 2:20
1
@Bilthon They are not binaries. They are gradle start-up scripts for Windows (gradle.bat) and Linux (gradlew).
– Willi Mentzel
Mar 24 '17 at 9:16
Ohh.. I see you're right, but aren't they autogenerated anyways?
– Bilthon
Mar 24 '17 at 21:32
2
@Bilthon Indeed, they are! They are generated with default options. If you change something, they should be included in your repository in order to build it properly when checking it out fresh. They are so small, it doesn't hurt to always keep them.
– Willi Mentzel
Mar 27 '17 at 12:05
add a comment |
up vote
11
down vote
up vote
11
down vote
For Android Studio 3.0 projects use the following:
.gitignore
.gradle
.idea
*.iml
gradle.properties
local.properties
.DS_Store
build
Gradle project folder
The only thing that should be in your (Gradle) project folder after repository cloning is this structure (at least for the use cases I encountered so far):
/app
/gradle
.gitignore
build.gradle
build.properties
gradlew
gradle.bat
settings.gradle
For Android Studio 3.0 projects use the following:
.gitignore
.gradle
.idea
*.iml
gradle.properties
local.properties
.DS_Store
build
Gradle project folder
The only thing that should be in your (Gradle) project folder after repository cloning is this structure (at least for the use cases I encountered so far):
/app
/gradle
.gitignore
build.gradle
build.properties
gradlew
gradle.bat
settings.gradle
edited Mar 11 at 17:41
answered Jun 30 '16 at 12:06
Willi Mentzel
7,987114366
7,987114366
1
Why should you keep binaries like gradlew and gradle.bat?
– Bilthon
Mar 24 '17 at 2:20
1
@Bilthon They are not binaries. They are gradle start-up scripts for Windows (gradle.bat) and Linux (gradlew).
– Willi Mentzel
Mar 24 '17 at 9:16
Ohh.. I see you're right, but aren't they autogenerated anyways?
– Bilthon
Mar 24 '17 at 21:32
2
@Bilthon Indeed, they are! They are generated with default options. If you change something, they should be included in your repository in order to build it properly when checking it out fresh. They are so small, it doesn't hurt to always keep them.
– Willi Mentzel
Mar 27 '17 at 12:05
add a comment |
1
Why should you keep binaries like gradlew and gradle.bat?
– Bilthon
Mar 24 '17 at 2:20
1
@Bilthon They are not binaries. They are gradle start-up scripts for Windows (gradle.bat) and Linux (gradlew).
– Willi Mentzel
Mar 24 '17 at 9:16
Ohh.. I see you're right, but aren't they autogenerated anyways?
– Bilthon
Mar 24 '17 at 21:32
2
@Bilthon Indeed, they are! They are generated with default options. If you change something, they should be included in your repository in order to build it properly when checking it out fresh. They are so small, it doesn't hurt to always keep them.
– Willi Mentzel
Mar 27 '17 at 12:05
1
1
Why should you keep binaries like gradlew and gradle.bat?
– Bilthon
Mar 24 '17 at 2:20
Why should you keep binaries like gradlew and gradle.bat?
– Bilthon
Mar 24 '17 at 2:20
1
1
@Bilthon They are not binaries. They are gradle start-up scripts for Windows (gradle.bat) and Linux (gradlew).
– Willi Mentzel
Mar 24 '17 at 9:16
@Bilthon They are not binaries. They are gradle start-up scripts for Windows (gradle.bat) and Linux (gradlew).
– Willi Mentzel
Mar 24 '17 at 9:16
Ohh.. I see you're right, but aren't they autogenerated anyways?
– Bilthon
Mar 24 '17 at 21:32
Ohh.. I see you're right, but aren't they autogenerated anyways?
– Bilthon
Mar 24 '17 at 21:32
2
2
@Bilthon Indeed, they are! They are generated with default options. If you change something, they should be included in your repository in order to build it properly when checking it out fresh. They are so small, it doesn't hurt to always keep them.
– Willi Mentzel
Mar 27 '17 at 12:05
@Bilthon Indeed, they are! They are generated with default options. If you change something, they should be included in your repository in order to build it properly when checking it out fresh. They are so small, it doesn't hurt to always keep them.
– Willi Mentzel
Mar 27 '17 at 12:05
add a comment |
up vote
8
down vote
There is NO NEED to add to the source control any of the following:
.idea/
.gradle/
*.iml
build/
local.properties
So you can configure hgignore or gitignore accordingly.
The first time a developer clones the source control can go:
- Open Android Studio
- Import Project
- Browse for the build.gradle within the cloned repository and open it
That's all
PS: Android Studio will then, through maven, get the gradle plugin assuming that your build.gradle looks similar to this:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Android studio will generate the content of .idea folder (including the workspace.xml, which shouldn't be in source control because it is generated) and the .gradle folder.
This approach is Eclipse-friendly in the way that the source control does not really know anything about Android Studio. Android Studio just needs the build.gradle to import a project and generate the rest.
5
Guys, those who vote negatively should provide a valid reason to do so. It might be helpful to let us/all know if we are mistaken with our answer.
– iberodev
Dec 2 '14 at 20:10
1
There is NO NEED
yes there are some cases: copyright templates that need to be share across team members, for instance.
– Henrique de Sousa
May 19 '16 at 14:51
add a comment |
up vote
8
down vote
There is NO NEED to add to the source control any of the following:
.idea/
.gradle/
*.iml
build/
local.properties
So you can configure hgignore or gitignore accordingly.
The first time a developer clones the source control can go:
- Open Android Studio
- Import Project
- Browse for the build.gradle within the cloned repository and open it
That's all
PS: Android Studio will then, through maven, get the gradle plugin assuming that your build.gradle looks similar to this:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Android studio will generate the content of .idea folder (including the workspace.xml, which shouldn't be in source control because it is generated) and the .gradle folder.
This approach is Eclipse-friendly in the way that the source control does not really know anything about Android Studio. Android Studio just needs the build.gradle to import a project and generate the rest.
5
Guys, those who vote negatively should provide a valid reason to do so. It might be helpful to let us/all know if we are mistaken with our answer.
– iberodev
Dec 2 '14 at 20:10
1
There is NO NEED
yes there are some cases: copyright templates that need to be share across team members, for instance.
– Henrique de Sousa
May 19 '16 at 14:51
add a comment |
up vote
8
down vote
up vote
8
down vote
There is NO NEED to add to the source control any of the following:
.idea/
.gradle/
*.iml
build/
local.properties
So you can configure hgignore or gitignore accordingly.
The first time a developer clones the source control can go:
- Open Android Studio
- Import Project
- Browse for the build.gradle within the cloned repository and open it
That's all
PS: Android Studio will then, through maven, get the gradle plugin assuming that your build.gradle looks similar to this:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Android studio will generate the content of .idea folder (including the workspace.xml, which shouldn't be in source control because it is generated) and the .gradle folder.
This approach is Eclipse-friendly in the way that the source control does not really know anything about Android Studio. Android Studio just needs the build.gradle to import a project and generate the rest.
There is NO NEED to add to the source control any of the following:
.idea/
.gradle/
*.iml
build/
local.properties
So you can configure hgignore or gitignore accordingly.
The first time a developer clones the source control can go:
- Open Android Studio
- Import Project
- Browse for the build.gradle within the cloned repository and open it
That's all
PS: Android Studio will then, through maven, get the gradle plugin assuming that your build.gradle looks similar to this:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Android studio will generate the content of .idea folder (including the workspace.xml, which shouldn't be in source control because it is generated) and the .gradle folder.
This approach is Eclipse-friendly in the way that the source control does not really know anything about Android Studio. Android Studio just needs the build.gradle to import a project and generate the rest.
answered Oct 10 '14 at 0:34
iberodev
3,38233062
3,38233062
5
Guys, those who vote negatively should provide a valid reason to do so. It might be helpful to let us/all know if we are mistaken with our answer.
– iberodev
Dec 2 '14 at 20:10
1
There is NO NEED
yes there are some cases: copyright templates that need to be share across team members, for instance.
– Henrique de Sousa
May 19 '16 at 14:51
add a comment |
5
Guys, those who vote negatively should provide a valid reason to do so. It might be helpful to let us/all know if we are mistaken with our answer.
– iberodev
Dec 2 '14 at 20:10
1
There is NO NEED
yes there are some cases: copyright templates that need to be share across team members, for instance.
– Henrique de Sousa
May 19 '16 at 14:51
5
5
Guys, those who vote negatively should provide a valid reason to do so. It might be helpful to let us/all know if we are mistaken with our answer.
– iberodev
Dec 2 '14 at 20:10
Guys, those who vote negatively should provide a valid reason to do so. It might be helpful to let us/all know if we are mistaken with our answer.
– iberodev
Dec 2 '14 at 20:10
1
1
There is NO NEED
yes there are some cases: copyright templates that need to be share across team members, for instance.– Henrique de Sousa
May 19 '16 at 14:51
There is NO NEED
yes there are some cases: copyright templates that need to be share across team members, for instance.– Henrique de Sousa
May 19 '16 at 14:51
add a comment |
up vote
8
down vote
I support the committing of .idea folder (excluding workspace.xml
and tasks.xml
). But I am starting to come to the conclusion that .iml files should be ignored.
Here is the issue:
Open a project in a directory named "foo" for example and you will get foo.iml and that all seems well and good. The problem is that if I simply rename the directory to foo2 (or clone it into another directory name) when you try to open the project in Android Studio you will get three things:
- A new iml file named foo2.iml
- The iml file for your Android project will be changed to point now to foo2 as its parent
- .idea/modules.xml will have a line added for foo2.iml so it has both the old iml file and the one for the new directory
I can find no way to prevent Android Studio from doing this iml file generation when the project is stored in a different directory. Adding them to source control is going to cause problems. Therefore I think perhaps we should ignore *.iml files and .idea/modules.xml
I ignore both/.idea
and.iml
files. I would like to hear why the.idea
folder should be committed.
– theblang
Jul 10 '14 at 14:36
Looking at my current project, I guess there are only 2 things I have checked in from .idea/: code style settings to enforce for the team and a user dictionary containing words specific to the project that are not real words. I started out with many files in .idea committed, but when a file starts showing up as changed for no good reason it would get added to .gitignore. My point was not so much that .idea should be checked in as it was to say .iml files and modules.xml should not be.
– user486646
Jul 11 '14 at 14:45
What were they?
– theblang
Jul 11 '14 at 14:48
Sorry, SO took my comment before I was done with it (gotta remember that comments don't accept line breaks). Edited with the rest of my thoughts.
– user486646
Jul 11 '14 at 14:52
Thanks! Yeah, those files that you mentioned do make sense. I agree, the biggest headache was thelibrary.xml
files that kept triggering messages. Also, I don't understand why I keep seeing people say that *.iml files should be included, so great point there.
– theblang
Jul 11 '14 at 15:11
add a comment |
up vote
8
down vote
I support the committing of .idea folder (excluding workspace.xml
and tasks.xml
). But I am starting to come to the conclusion that .iml files should be ignored.
Here is the issue:
Open a project in a directory named "foo" for example and you will get foo.iml and that all seems well and good. The problem is that if I simply rename the directory to foo2 (or clone it into another directory name) when you try to open the project in Android Studio you will get three things:
- A new iml file named foo2.iml
- The iml file for your Android project will be changed to point now to foo2 as its parent
- .idea/modules.xml will have a line added for foo2.iml so it has both the old iml file and the one for the new directory
I can find no way to prevent Android Studio from doing this iml file generation when the project is stored in a different directory. Adding them to source control is going to cause problems. Therefore I think perhaps we should ignore *.iml files and .idea/modules.xml
I ignore both/.idea
and.iml
files. I would like to hear why the.idea
folder should be committed.
– theblang
Jul 10 '14 at 14:36
Looking at my current project, I guess there are only 2 things I have checked in from .idea/: code style settings to enforce for the team and a user dictionary containing words specific to the project that are not real words. I started out with many files in .idea committed, but when a file starts showing up as changed for no good reason it would get added to .gitignore. My point was not so much that .idea should be checked in as it was to say .iml files and modules.xml should not be.
– user486646
Jul 11 '14 at 14:45
What were they?
– theblang
Jul 11 '14 at 14:48
Sorry, SO took my comment before I was done with it (gotta remember that comments don't accept line breaks). Edited with the rest of my thoughts.
– user486646
Jul 11 '14 at 14:52
Thanks! Yeah, those files that you mentioned do make sense. I agree, the biggest headache was thelibrary.xml
files that kept triggering messages. Also, I don't understand why I keep seeing people say that *.iml files should be included, so great point there.
– theblang
Jul 11 '14 at 15:11
add a comment |
up vote
8
down vote
up vote
8
down vote
I support the committing of .idea folder (excluding workspace.xml
and tasks.xml
). But I am starting to come to the conclusion that .iml files should be ignored.
Here is the issue:
Open a project in a directory named "foo" for example and you will get foo.iml and that all seems well and good. The problem is that if I simply rename the directory to foo2 (or clone it into another directory name) when you try to open the project in Android Studio you will get three things:
- A new iml file named foo2.iml
- The iml file for your Android project will be changed to point now to foo2 as its parent
- .idea/modules.xml will have a line added for foo2.iml so it has both the old iml file and the one for the new directory
I can find no way to prevent Android Studio from doing this iml file generation when the project is stored in a different directory. Adding them to source control is going to cause problems. Therefore I think perhaps we should ignore *.iml files and .idea/modules.xml
I support the committing of .idea folder (excluding workspace.xml
and tasks.xml
). But I am starting to come to the conclusion that .iml files should be ignored.
Here is the issue:
Open a project in a directory named "foo" for example and you will get foo.iml and that all seems well and good. The problem is that if I simply rename the directory to foo2 (or clone it into another directory name) when you try to open the project in Android Studio you will get three things:
- A new iml file named foo2.iml
- The iml file for your Android project will be changed to point now to foo2 as its parent
- .idea/modules.xml will have a line added for foo2.iml so it has both the old iml file and the one for the new directory
I can find no way to prevent Android Studio from doing this iml file generation when the project is stored in a different directory. Adding them to source control is going to cause problems. Therefore I think perhaps we should ignore *.iml files and .idea/modules.xml
edited Apr 17 '16 at 3:44
linquize
14.2k84567
14.2k84567
answered May 6 '14 at 20:38
user486646
I ignore both/.idea
and.iml
files. I would like to hear why the.idea
folder should be committed.
– theblang
Jul 10 '14 at 14:36
Looking at my current project, I guess there are only 2 things I have checked in from .idea/: code style settings to enforce for the team and a user dictionary containing words specific to the project that are not real words. I started out with many files in .idea committed, but when a file starts showing up as changed for no good reason it would get added to .gitignore. My point was not so much that .idea should be checked in as it was to say .iml files and modules.xml should not be.
– user486646
Jul 11 '14 at 14:45
What were they?
– theblang
Jul 11 '14 at 14:48
Sorry, SO took my comment before I was done with it (gotta remember that comments don't accept line breaks). Edited with the rest of my thoughts.
– user486646
Jul 11 '14 at 14:52
Thanks! Yeah, those files that you mentioned do make sense. I agree, the biggest headache was thelibrary.xml
files that kept triggering messages. Also, I don't understand why I keep seeing people say that *.iml files should be included, so great point there.
– theblang
Jul 11 '14 at 15:11
add a comment |
I ignore both/.idea
and.iml
files. I would like to hear why the.idea
folder should be committed.
– theblang
Jul 10 '14 at 14:36
Looking at my current project, I guess there are only 2 things I have checked in from .idea/: code style settings to enforce for the team and a user dictionary containing words specific to the project that are not real words. I started out with many files in .idea committed, but when a file starts showing up as changed for no good reason it would get added to .gitignore. My point was not so much that .idea should be checked in as it was to say .iml files and modules.xml should not be.
– user486646
Jul 11 '14 at 14:45
What were they?
– theblang
Jul 11 '14 at 14:48
Sorry, SO took my comment before I was done with it (gotta remember that comments don't accept line breaks). Edited with the rest of my thoughts.
– user486646
Jul 11 '14 at 14:52
Thanks! Yeah, those files that you mentioned do make sense. I agree, the biggest headache was thelibrary.xml
files that kept triggering messages. Also, I don't understand why I keep seeing people say that *.iml files should be included, so great point there.
– theblang
Jul 11 '14 at 15:11
I ignore both
/.idea
and .iml
files. I would like to hear why the .idea
folder should be committed.– theblang
Jul 10 '14 at 14:36
I ignore both
/.idea
and .iml
files. I would like to hear why the .idea
folder should be committed.– theblang
Jul 10 '14 at 14:36
Looking at my current project, I guess there are only 2 things I have checked in from .idea/: code style settings to enforce for the team and a user dictionary containing words specific to the project that are not real words. I started out with many files in .idea committed, but when a file starts showing up as changed for no good reason it would get added to .gitignore. My point was not so much that .idea should be checked in as it was to say .iml files and modules.xml should not be.
– user486646
Jul 11 '14 at 14:45
Looking at my current project, I guess there are only 2 things I have checked in from .idea/: code style settings to enforce for the team and a user dictionary containing words specific to the project that are not real words. I started out with many files in .idea committed, but when a file starts showing up as changed for no good reason it would get added to .gitignore. My point was not so much that .idea should be checked in as it was to say .iml files and modules.xml should not be.
– user486646
Jul 11 '14 at 14:45
What were they?
– theblang
Jul 11 '14 at 14:48
What were they?
– theblang
Jul 11 '14 at 14:48
Sorry, SO took my comment before I was done with it (gotta remember that comments don't accept line breaks). Edited with the rest of my thoughts.
– user486646
Jul 11 '14 at 14:52
Sorry, SO took my comment before I was done with it (gotta remember that comments don't accept line breaks). Edited with the rest of my thoughts.
– user486646
Jul 11 '14 at 14:52
Thanks! Yeah, those files that you mentioned do make sense. I agree, the biggest headache was the
library.xml
files that kept triggering messages. Also, I don't understand why I keep seeing people say that *.iml files should be included, so great point there.– theblang
Jul 11 '14 at 15:11
Thanks! Yeah, those files that you mentioned do make sense. I agree, the biggest headache was the
library.xml
files that kept triggering messages. Also, I don't understand why I keep seeing people say that *.iml files should be included, so great point there.– theblang
Jul 11 '14 at 15:11
add a comment |
up vote
7
down vote
Tested with Android Studio 3.0
You might need to Install .ignore plugin.
You can auto-generate the .gitignore file for Android.
Right click on folder and follow
Then Select Android from left panel and click Generate
Android Studio will generate .gitignore file which contains all the file need to ignore.
Taken from http://menukanows.com/how-to-add-gitignore-file-in-android-project/
add a comment |
up vote
7
down vote
Tested with Android Studio 3.0
You might need to Install .ignore plugin.
You can auto-generate the .gitignore file for Android.
Right click on folder and follow
Then Select Android from left panel and click Generate
Android Studio will generate .gitignore file which contains all the file need to ignore.
Taken from http://menukanows.com/how-to-add-gitignore-file-in-android-project/
add a comment |
up vote
7
down vote
up vote
7
down vote
Tested with Android Studio 3.0
You might need to Install .ignore plugin.
You can auto-generate the .gitignore file for Android.
Right click on folder and follow
Then Select Android from left panel and click Generate
Android Studio will generate .gitignore file which contains all the file need to ignore.
Taken from http://menukanows.com/how-to-add-gitignore-file-in-android-project/
Tested with Android Studio 3.0
You might need to Install .ignore plugin.
You can auto-generate the .gitignore file for Android.
Right click on folder and follow
Then Select Android from left panel and click Generate
Android Studio will generate .gitignore file which contains all the file need to ignore.
Taken from http://menukanows.com/how-to-add-gitignore-file-in-android-project/
edited Jan 21 at 8:44
answered Dec 21 '17 at 8:10
Menuka Ishan
1,1342135
1,1342135
add a comment |
add a comment |
up vote
7
down vote
It's the best way to generate .gitignore
via here
1
I can't seem to make this work for Android Studio. If I just select "android" it seems to be an Eclipse implementation. Am I doing it wrong?
– zipzit
Feb 5 '15 at 1:20
The only mention to Eclipse is on one line: "Proguard folder generated by Eclipse". The rest seems OK for AS
– Jose_GD
Feb 26 '15 at 19:37
@zipzit, possibly you are right. It seems the site generates .gitignore not for Android Studio as it doesn't contain .idea/.
– CoolMind
Feb 19 '16 at 12:55
add a comment |
up vote
7
down vote
It's the best way to generate .gitignore
via here
1
I can't seem to make this work for Android Studio. If I just select "android" it seems to be an Eclipse implementation. Am I doing it wrong?
– zipzit
Feb 5 '15 at 1:20
The only mention to Eclipse is on one line: "Proguard folder generated by Eclipse". The rest seems OK for AS
– Jose_GD
Feb 26 '15 at 19:37
@zipzit, possibly you are right. It seems the site generates .gitignore not for Android Studio as it doesn't contain .idea/.
– CoolMind
Feb 19 '16 at 12:55
add a comment |
up vote
7
down vote
up vote
7
down vote
It's the best way to generate .gitignore
via here
It's the best way to generate .gitignore
via here
edited Nov 22 at 8:13
Agilanbu
883617
883617
answered Jun 2 '14 at 0:17
Jacky
2,52742842
2,52742842
1
I can't seem to make this work for Android Studio. If I just select "android" it seems to be an Eclipse implementation. Am I doing it wrong?
– zipzit
Feb 5 '15 at 1:20
The only mention to Eclipse is on one line: "Proguard folder generated by Eclipse". The rest seems OK for AS
– Jose_GD
Feb 26 '15 at 19:37
@zipzit, possibly you are right. It seems the site generates .gitignore not for Android Studio as it doesn't contain .idea/.
– CoolMind
Feb 19 '16 at 12:55
add a comment |
1
I can't seem to make this work for Android Studio. If I just select "android" it seems to be an Eclipse implementation. Am I doing it wrong?
– zipzit
Feb 5 '15 at 1:20
The only mention to Eclipse is on one line: "Proguard folder generated by Eclipse". The rest seems OK for AS
– Jose_GD
Feb 26 '15 at 19:37
@zipzit, possibly you are right. It seems the site generates .gitignore not for Android Studio as it doesn't contain .idea/.
– CoolMind
Feb 19 '16 at 12:55
1
1
I can't seem to make this work for Android Studio. If I just select "android" it seems to be an Eclipse implementation. Am I doing it wrong?
– zipzit
Feb 5 '15 at 1:20
I can't seem to make this work for Android Studio. If I just select "android" it seems to be an Eclipse implementation. Am I doing it wrong?
– zipzit
Feb 5 '15 at 1:20
The only mention to Eclipse is on one line: "Proguard folder generated by Eclipse". The rest seems OK for AS
– Jose_GD
Feb 26 '15 at 19:37
The only mention to Eclipse is on one line: "Proguard folder generated by Eclipse". The rest seems OK for AS
– Jose_GD
Feb 26 '15 at 19:37
@zipzit, possibly you are right. It seems the site generates .gitignore not for Android Studio as it doesn't contain .idea/.
– CoolMind
Feb 19 '16 at 12:55
@zipzit, possibly you are right. It seems the site generates .gitignore not for Android Studio as it doesn't contain .idea/.
– CoolMind
Feb 19 '16 at 12:55
add a comment |
up vote
6
down vote
Depends on how your project format is maintained:
You have two options:
- Directory-based format (You will have a
.idea
folder which contains
the project specific files) - File-based format (configuration files are
.iws
and.ipr
)
Ref:
http://www.jetbrains.com/idea/webhelp/project.html
Files committed to version control depends on the above:
- Include .idea folder to version control, exclude
workspace.xml
and
tasks.xml
- Version control
.ipr
file and all the.iml
module files, exclude
the.iws
file as it stores user specific settings.
Ref:
https://intellij-support.jetbrains.com/entries/23393067
1
all of my projects seem to have both .idea folders and .iws files
– respectTheCode
Jun 11 '13 at 12:07
1
Personally I tried following advice from JetBrains but it didn't work for me. Me and another dev are using Android Studio and we had .idea and .iml file in git. I soon found out that once you start merging commits and get to all sorts of trouble when merge tool fails to merge any of the files under .idea path. As result I added all imls and .idea to gitignore. After all Studio does a very good job of creating project structure when importing Gradle project. So now I just pay close attention to what I have in my gradle files.
– zmicer
Feb 24 '14 at 10:44
add a comment |
up vote
6
down vote
Depends on how your project format is maintained:
You have two options:
- Directory-based format (You will have a
.idea
folder which contains
the project specific files) - File-based format (configuration files are
.iws
and.ipr
)
Ref:
http://www.jetbrains.com/idea/webhelp/project.html
Files committed to version control depends on the above:
- Include .idea folder to version control, exclude
workspace.xml
and
tasks.xml
- Version control
.ipr
file and all the.iml
module files, exclude
the.iws
file as it stores user specific settings.
Ref:
https://intellij-support.jetbrains.com/entries/23393067
1
all of my projects seem to have both .idea folders and .iws files
– respectTheCode
Jun 11 '13 at 12:07
1
Personally I tried following advice from JetBrains but it didn't work for me. Me and another dev are using Android Studio and we had .idea and .iml file in git. I soon found out that once you start merging commits and get to all sorts of trouble when merge tool fails to merge any of the files under .idea path. As result I added all imls and .idea to gitignore. After all Studio does a very good job of creating project structure when importing Gradle project. So now I just pay close attention to what I have in my gradle files.
– zmicer
Feb 24 '14 at 10:44
add a comment |
up vote
6
down vote
up vote
6
down vote
Depends on how your project format is maintained:
You have two options:
- Directory-based format (You will have a
.idea
folder which contains
the project specific files) - File-based format (configuration files are
.iws
and.ipr
)
Ref:
http://www.jetbrains.com/idea/webhelp/project.html
Files committed to version control depends on the above:
- Include .idea folder to version control, exclude
workspace.xml
and
tasks.xml
- Version control
.ipr
file and all the.iml
module files, exclude
the.iws
file as it stores user specific settings.
Ref:
https://intellij-support.jetbrains.com/entries/23393067
Depends on how your project format is maintained:
You have two options:
- Directory-based format (You will have a
.idea
folder which contains
the project specific files) - File-based format (configuration files are
.iws
and.ipr
)
Ref:
http://www.jetbrains.com/idea/webhelp/project.html
Files committed to version control depends on the above:
- Include .idea folder to version control, exclude
workspace.xml
and
tasks.xml
- Version control
.ipr
file and all the.iml
module files, exclude
the.iws
file as it stores user specific settings.
Ref:
https://intellij-support.jetbrains.com/entries/23393067
edited May 19 at 15:16
Ashraf.Shk786
5161821
5161821
answered May 30 '13 at 9:09
ramk
772
772
1
all of my projects seem to have both .idea folders and .iws files
– respectTheCode
Jun 11 '13 at 12:07
1
Personally I tried following advice from JetBrains but it didn't work for me. Me and another dev are using Android Studio and we had .idea and .iml file in git. I soon found out that once you start merging commits and get to all sorts of trouble when merge tool fails to merge any of the files under .idea path. As result I added all imls and .idea to gitignore. After all Studio does a very good job of creating project structure when importing Gradle project. So now I just pay close attention to what I have in my gradle files.
– zmicer
Feb 24 '14 at 10:44
add a comment |
1
all of my projects seem to have both .idea folders and .iws files
– respectTheCode
Jun 11 '13 at 12:07
1
Personally I tried following advice from JetBrains but it didn't work for me. Me and another dev are using Android Studio and we had .idea and .iml file in git. I soon found out that once you start merging commits and get to all sorts of trouble when merge tool fails to merge any of the files under .idea path. As result I added all imls and .idea to gitignore. After all Studio does a very good job of creating project structure when importing Gradle project. So now I just pay close attention to what I have in my gradle files.
– zmicer
Feb 24 '14 at 10:44
1
1
all of my projects seem to have both .idea folders and .iws files
– respectTheCode
Jun 11 '13 at 12:07
all of my projects seem to have both .idea folders and .iws files
– respectTheCode
Jun 11 '13 at 12:07
1
1
Personally I tried following advice from JetBrains but it didn't work for me. Me and another dev are using Android Studio and we had .idea and .iml file in git. I soon found out that once you start merging commits and get to all sorts of trouble when merge tool fails to merge any of the files under .idea path. As result I added all imls and .idea to gitignore. After all Studio does a very good job of creating project structure when importing Gradle project. So now I just pay close attention to what I have in my gradle files.
– zmicer
Feb 24 '14 at 10:44
Personally I tried following advice from JetBrains but it didn't work for me. Me and another dev are using Android Studio and we had .idea and .iml file in git. I soon found out that once you start merging commits and get to all sorts of trouble when merge tool fails to merge any of the files under .idea path. As result I added all imls and .idea to gitignore. After all Studio does a very good job of creating project structure when importing Gradle project. So now I just pay close attention to what I have in my gradle files.
– zmicer
Feb 24 '14 at 10:44
add a comment |
up vote
4
down vote
Basically any file that is automatically regenerated.
A good test is to clone your repo and see if Android Studio is able to interpret and run your project immediately (generating what is missing).
If not, find what is missing, and make sure it isn't ignored, but added to the repo.
That being said, you can take example on existing .gitignore
files, like the Android one.
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
11
This is incorrect. You should check in your *.iml files, and most likely .idea and *.ipr as well. The "anything that is automatically generated" part is especially wrong. Most Android projects are automatically generated after all.
– Sky Kelsey
Aug 26 '13 at 22:30
6
The *.iml, *.idea and *.ipr are Android-Studio/IntelliJ specific. They are not needed to build the project. As they are IDE-specific, and not build-chain specific, they should probably not be checked in. Everyone can use any IDE, there is no reason to check in IntelliJ project files and not Eclipse ones, for example.
– Marc Plano-Lesay
Oct 1 '13 at 6:09
2
If you want to work on multiple forks of the same project, or with a team where everyone uses the same IDE, or have version control of the intricate settings you use for your IDE, then yes, you should check the files in. Project files for IntelliJ are much more than simple fluff used to open your code in an editor.
– Sky Kelsey
Nov 18 '13 at 7:00
2
why do my iml files keep showing as changed between me and my colleague? specifically external.root.project.path keeps changing under the <module/> tag
– Sam
Mar 25 '14 at 18:28
Using Android Studio 0.8.12 on Windows 8.1 and on OS X Mavericks with the same project, I notice that the following two files get modified and marked as changed by Git when I open the project: <project name>.iml and .ideamisc.xml. Specifically: <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> gets added or removed to/from <project name>.iml and .ideamisc.xml gets changed to due JDK install differences between the OS's.
– jkwuc89
Oct 13 '14 at 17:44
add a comment |
up vote
4
down vote
Basically any file that is automatically regenerated.
A good test is to clone your repo and see if Android Studio is able to interpret and run your project immediately (generating what is missing).
If not, find what is missing, and make sure it isn't ignored, but added to the repo.
That being said, you can take example on existing .gitignore
files, like the Android one.
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
11
This is incorrect. You should check in your *.iml files, and most likely .idea and *.ipr as well. The "anything that is automatically generated" part is especially wrong. Most Android projects are automatically generated after all.
– Sky Kelsey
Aug 26 '13 at 22:30
6
The *.iml, *.idea and *.ipr are Android-Studio/IntelliJ specific. They are not needed to build the project. As they are IDE-specific, and not build-chain specific, they should probably not be checked in. Everyone can use any IDE, there is no reason to check in IntelliJ project files and not Eclipse ones, for example.
– Marc Plano-Lesay
Oct 1 '13 at 6:09
2
If you want to work on multiple forks of the same project, or with a team where everyone uses the same IDE, or have version control of the intricate settings you use for your IDE, then yes, you should check the files in. Project files for IntelliJ are much more than simple fluff used to open your code in an editor.
– Sky Kelsey
Nov 18 '13 at 7:00
2
why do my iml files keep showing as changed between me and my colleague? specifically external.root.project.path keeps changing under the <module/> tag
– Sam
Mar 25 '14 at 18:28
Using Android Studio 0.8.12 on Windows 8.1 and on OS X Mavericks with the same project, I notice that the following two files get modified and marked as changed by Git when I open the project: <project name>.iml and .ideamisc.xml. Specifically: <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> gets added or removed to/from <project name>.iml and .ideamisc.xml gets changed to due JDK install differences between the OS's.
– jkwuc89
Oct 13 '14 at 17:44
add a comment |
up vote
4
down vote
up vote
4
down vote
Basically any file that is automatically regenerated.
A good test is to clone your repo and see if Android Studio is able to interpret and run your project immediately (generating what is missing).
If not, find what is missing, and make sure it isn't ignored, but added to the repo.
That being said, you can take example on existing .gitignore
files, like the Android one.
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
Basically any file that is automatically regenerated.
A good test is to clone your repo and see if Android Studio is able to interpret and run your project immediately (generating what is missing).
If not, find what is missing, and make sure it isn't ignored, but added to the repo.
That being said, you can take example on existing .gitignore
files, like the Android one.
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
edited Jun 12 '13 at 16:27
community wiki
2 revs
VonC
11
This is incorrect. You should check in your *.iml files, and most likely .idea and *.ipr as well. The "anything that is automatically generated" part is especially wrong. Most Android projects are automatically generated after all.
– Sky Kelsey
Aug 26 '13 at 22:30
6
The *.iml, *.idea and *.ipr are Android-Studio/IntelliJ specific. They are not needed to build the project. As they are IDE-specific, and not build-chain specific, they should probably not be checked in. Everyone can use any IDE, there is no reason to check in IntelliJ project files and not Eclipse ones, for example.
– Marc Plano-Lesay
Oct 1 '13 at 6:09
2
If you want to work on multiple forks of the same project, or with a team where everyone uses the same IDE, or have version control of the intricate settings you use for your IDE, then yes, you should check the files in. Project files for IntelliJ are much more than simple fluff used to open your code in an editor.
– Sky Kelsey
Nov 18 '13 at 7:00
2
why do my iml files keep showing as changed between me and my colleague? specifically external.root.project.path keeps changing under the <module/> tag
– Sam
Mar 25 '14 at 18:28
Using Android Studio 0.8.12 on Windows 8.1 and on OS X Mavericks with the same project, I notice that the following two files get modified and marked as changed by Git when I open the project: <project name>.iml and .ideamisc.xml. Specifically: <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> gets added or removed to/from <project name>.iml and .ideamisc.xml gets changed to due JDK install differences between the OS's.
– jkwuc89
Oct 13 '14 at 17:44
add a comment |
11
This is incorrect. You should check in your *.iml files, and most likely .idea and *.ipr as well. The "anything that is automatically generated" part is especially wrong. Most Android projects are automatically generated after all.
– Sky Kelsey
Aug 26 '13 at 22:30
6
The *.iml, *.idea and *.ipr are Android-Studio/IntelliJ specific. They are not needed to build the project. As they are IDE-specific, and not build-chain specific, they should probably not be checked in. Everyone can use any IDE, there is no reason to check in IntelliJ project files and not Eclipse ones, for example.
– Marc Plano-Lesay
Oct 1 '13 at 6:09
2
If you want to work on multiple forks of the same project, or with a team where everyone uses the same IDE, or have version control of the intricate settings you use for your IDE, then yes, you should check the files in. Project files for IntelliJ are much more than simple fluff used to open your code in an editor.
– Sky Kelsey
Nov 18 '13 at 7:00
2
why do my iml files keep showing as changed between me and my colleague? specifically external.root.project.path keeps changing under the <module/> tag
– Sam
Mar 25 '14 at 18:28
Using Android Studio 0.8.12 on Windows 8.1 and on OS X Mavericks with the same project, I notice that the following two files get modified and marked as changed by Git when I open the project: <project name>.iml and .ideamisc.xml. Specifically: <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> gets added or removed to/from <project name>.iml and .ideamisc.xml gets changed to due JDK install differences between the OS's.
– jkwuc89
Oct 13 '14 at 17:44
11
11
This is incorrect. You should check in your *.iml files, and most likely .idea and *.ipr as well. The "anything that is automatically generated" part is especially wrong. Most Android projects are automatically generated after all.
– Sky Kelsey
Aug 26 '13 at 22:30
This is incorrect. You should check in your *.iml files, and most likely .idea and *.ipr as well. The "anything that is automatically generated" part is especially wrong. Most Android projects are automatically generated after all.
– Sky Kelsey
Aug 26 '13 at 22:30
6
6
The *.iml, *.idea and *.ipr are Android-Studio/IntelliJ specific. They are not needed to build the project. As they are IDE-specific, and not build-chain specific, they should probably not be checked in. Everyone can use any IDE, there is no reason to check in IntelliJ project files and not Eclipse ones, for example.
– Marc Plano-Lesay
Oct 1 '13 at 6:09
The *.iml, *.idea and *.ipr are Android-Studio/IntelliJ specific. They are not needed to build the project. As they are IDE-specific, and not build-chain specific, they should probably not be checked in. Everyone can use any IDE, there is no reason to check in IntelliJ project files and not Eclipse ones, for example.
– Marc Plano-Lesay
Oct 1 '13 at 6:09
2
2
If you want to work on multiple forks of the same project, or with a team where everyone uses the same IDE, or have version control of the intricate settings you use for your IDE, then yes, you should check the files in. Project files for IntelliJ are much more than simple fluff used to open your code in an editor.
– Sky Kelsey
Nov 18 '13 at 7:00
If you want to work on multiple forks of the same project, or with a team where everyone uses the same IDE, or have version control of the intricate settings you use for your IDE, then yes, you should check the files in. Project files for IntelliJ are much more than simple fluff used to open your code in an editor.
– Sky Kelsey
Nov 18 '13 at 7:00
2
2
why do my iml files keep showing as changed between me and my colleague? specifically external.root.project.path keeps changing under the <module/> tag
– Sam
Mar 25 '14 at 18:28
why do my iml files keep showing as changed between me and my colleague? specifically external.root.project.path keeps changing under the <module/> tag
– Sam
Mar 25 '14 at 18:28
Using Android Studio 0.8.12 on Windows 8.1 and on OS X Mavericks with the same project, I notice that the following two files get modified and marked as changed by Git when I open the project: <project name>.iml and .ideamisc.xml. Specifically: <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> gets added or removed to/from <project name>.iml and .ideamisc.xml gets changed to due JDK install differences between the OS's.
– jkwuc89
Oct 13 '14 at 17:44
Using Android Studio 0.8.12 on Windows 8.1 and on OS X Mavericks with the same project, I notice that the following two files get modified and marked as changed by Git when I open the project: <project name>.iml and .ideamisc.xml. Specifically: <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> gets added or removed to/from <project name>.iml and .ideamisc.xml gets changed to due JDK install differences between the OS's.
– jkwuc89
Oct 13 '14 at 17:44
add a comment |
up vote
4
down vote
I'm kosher with adding the .iml files and Intellij sez to add the .idea folder but ignore .idea/workspace.xml and .idea/tasks.xml, but what about .idea/libraries/ ?
I don't see how it makes sense to add this. It has a list of XML files that list libraries the Android Studio project is supposed to know about. These are supposed to come instead from build.gradle defined dependencies -- not an IDE project file.
Also the contents of one of these files looks like this:
<component name="libraryTable">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/artifacts-26/filestore/com.example/example/etc...jar!"/>
It doesn't make sense to commit this. What if the user specified a different home dir for gradle, or if they use a different gradle version, the path under .gradle/caches/artifacts-xxx
is going to be different for them (i.e. artifacts-
the number appended on the end will relate to the gradle version release you are using.) These paths are not universal, and yet the advice is to check all this in?
add a comment |
up vote
4
down vote
I'm kosher with adding the .iml files and Intellij sez to add the .idea folder but ignore .idea/workspace.xml and .idea/tasks.xml, but what about .idea/libraries/ ?
I don't see how it makes sense to add this. It has a list of XML files that list libraries the Android Studio project is supposed to know about. These are supposed to come instead from build.gradle defined dependencies -- not an IDE project file.
Also the contents of one of these files looks like this:
<component name="libraryTable">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/artifacts-26/filestore/com.example/example/etc...jar!"/>
It doesn't make sense to commit this. What if the user specified a different home dir for gradle, or if they use a different gradle version, the path under .gradle/caches/artifacts-xxx
is going to be different for them (i.e. artifacts-
the number appended on the end will relate to the gradle version release you are using.) These paths are not universal, and yet the advice is to check all this in?
add a comment |
up vote
4
down vote
up vote
4
down vote
I'm kosher with adding the .iml files and Intellij sez to add the .idea folder but ignore .idea/workspace.xml and .idea/tasks.xml, but what about .idea/libraries/ ?
I don't see how it makes sense to add this. It has a list of XML files that list libraries the Android Studio project is supposed to know about. These are supposed to come instead from build.gradle defined dependencies -- not an IDE project file.
Also the contents of one of these files looks like this:
<component name="libraryTable">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/artifacts-26/filestore/com.example/example/etc...jar!"/>
It doesn't make sense to commit this. What if the user specified a different home dir for gradle, or if they use a different gradle version, the path under .gradle/caches/artifacts-xxx
is going to be different for them (i.e. artifacts-
the number appended on the end will relate to the gradle version release you are using.) These paths are not universal, and yet the advice is to check all this in?
I'm kosher with adding the .iml files and Intellij sez to add the .idea folder but ignore .idea/workspace.xml and .idea/tasks.xml, but what about .idea/libraries/ ?
I don't see how it makes sense to add this. It has a list of XML files that list libraries the Android Studio project is supposed to know about. These are supposed to come instead from build.gradle defined dependencies -- not an IDE project file.
Also the contents of one of these files looks like this:
<component name="libraryTable">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/artifacts-26/filestore/com.example/example/etc...jar!"/>
It doesn't make sense to commit this. What if the user specified a different home dir for gradle, or if they use a different gradle version, the path under .gradle/caches/artifacts-xxx
is going to be different for them (i.e. artifacts-
the number appended on the end will relate to the gradle version release you are using.) These paths are not universal, and yet the advice is to check all this in?
answered Oct 2 '13 at 16:58
zenocon
8121020
8121020
add a comment |
add a comment |
up vote
4
down vote
As of Android Studio 0.8.4 .gitignore
file is generated automatically when starting new project.
By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
add a comment |
up vote
4
down vote
As of Android Studio 0.8.4 .gitignore
file is generated automatically when starting new project.
By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
add a comment |
up vote
4
down vote
up vote
4
down vote
As of Android Studio 0.8.4 .gitignore
file is generated automatically when starting new project.
By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
As of Android Studio 0.8.4 .gitignore
file is generated automatically when starting new project.
By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
answered Aug 18 '14 at 20:46
Johnny Doe
1,83742040
1,83742040
add a comment |
add a comment |
up vote
3
down vote
I know this is an old topic and there are certainly a lot of options, but I really prefer gibo
by Simon Whitaker. It's super simple to use, cross-platform (mac, *nix, and windows), and uses the github gitignore
repo so it is (basically) always up to date.
Make sure your local cache is up to date:
$ gibo --upgrade
From https://github.com/github/gitignore
* branch master -> FETCH_HEAD
Current branch master is up to date.
Search for the language/technology you need:
$ gibo --search android
Android
Display the .gitignore file:
$ gibo Android
### Android
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
Now, append it to your project's .gitignore file:
$ gibo Android >> .gitignore
(Make sure you use >>
to append to your project's .gitignore file; one >
will overwrite it - as I've done many times on accident!)
I know this isn't answering the OP's exact question, but using gibo makes it so you pretty much don't have to think about 'the question' anymore! .. it's nice! ;)
add a comment |
up vote
3
down vote
I know this is an old topic and there are certainly a lot of options, but I really prefer gibo
by Simon Whitaker. It's super simple to use, cross-platform (mac, *nix, and windows), and uses the github gitignore
repo so it is (basically) always up to date.
Make sure your local cache is up to date:
$ gibo --upgrade
From https://github.com/github/gitignore
* branch master -> FETCH_HEAD
Current branch master is up to date.
Search for the language/technology you need:
$ gibo --search android
Android
Display the .gitignore file:
$ gibo Android
### Android
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
Now, append it to your project's .gitignore file:
$ gibo Android >> .gitignore
(Make sure you use >>
to append to your project's .gitignore file; one >
will overwrite it - as I've done many times on accident!)
I know this isn't answering the OP's exact question, but using gibo makes it so you pretty much don't have to think about 'the question' anymore! .. it's nice! ;)
add a comment |
up vote
3
down vote
up vote
3
down vote
I know this is an old topic and there are certainly a lot of options, but I really prefer gibo
by Simon Whitaker. It's super simple to use, cross-platform (mac, *nix, and windows), and uses the github gitignore
repo so it is (basically) always up to date.
Make sure your local cache is up to date:
$ gibo --upgrade
From https://github.com/github/gitignore
* branch master -> FETCH_HEAD
Current branch master is up to date.
Search for the language/technology you need:
$ gibo --search android
Android
Display the .gitignore file:
$ gibo Android
### Android
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
Now, append it to your project's .gitignore file:
$ gibo Android >> .gitignore
(Make sure you use >>
to append to your project's .gitignore file; one >
will overwrite it - as I've done many times on accident!)
I know this isn't answering the OP's exact question, but using gibo makes it so you pretty much don't have to think about 'the question' anymore! .. it's nice! ;)
I know this is an old topic and there are certainly a lot of options, but I really prefer gibo
by Simon Whitaker. It's super simple to use, cross-platform (mac, *nix, and windows), and uses the github gitignore
repo so it is (basically) always up to date.
Make sure your local cache is up to date:
$ gibo --upgrade
From https://github.com/github/gitignore
* branch master -> FETCH_HEAD
Current branch master is up to date.
Search for the language/technology you need:
$ gibo --search android
Android
Display the .gitignore file:
$ gibo Android
### Android
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
Now, append it to your project's .gitignore file:
$ gibo Android >> .gitignore
(Make sure you use >>
to append to your project's .gitignore file; one >
will overwrite it - as I've done many times on accident!)
I know this isn't answering the OP's exact question, but using gibo makes it so you pretty much don't have to think about 'the question' anymore! .. it's nice! ;)
answered Dec 9 '14 at 19:28
wasatchwizard
1,5161817
1,5161817
add a comment |
add a comment |
up vote
3
down vote
To get a better idea, all you need are the following files
- app
- build.gradle
- settings.gradle
You could put everything else in the .gitignore file. All your app changes lies mostly in these files and folders. The rest you see in a basic project are gradle build files or Android Studio configuration files.
If you are using Android Studio, you can use "Import project" to successfully build the project. Alternatively you can build using command line, follow Building Android Projects with Gradle.
add a comment |
up vote
3
down vote
To get a better idea, all you need are the following files
- app
- build.gradle
- settings.gradle
You could put everything else in the .gitignore file. All your app changes lies mostly in these files and folders. The rest you see in a basic project are gradle build files or Android Studio configuration files.
If you are using Android Studio, you can use "Import project" to successfully build the project. Alternatively you can build using command line, follow Building Android Projects with Gradle.
add a comment |
up vote
3
down vote
up vote
3
down vote
To get a better idea, all you need are the following files
- app
- build.gradle
- settings.gradle
You could put everything else in the .gitignore file. All your app changes lies mostly in these files and folders. The rest you see in a basic project are gradle build files or Android Studio configuration files.
If you are using Android Studio, you can use "Import project" to successfully build the project. Alternatively you can build using command line, follow Building Android Projects with Gradle.
To get a better idea, all you need are the following files
- app
- build.gradle
- settings.gradle
You could put everything else in the .gitignore file. All your app changes lies mostly in these files and folders. The rest you see in a basic project are gradle build files or Android Studio configuration files.
If you are using Android Studio, you can use "Import project" to successfully build the project. Alternatively you can build using command line, follow Building Android Projects with Gradle.
edited Oct 8 '15 at 6:57
answered Sep 21 '15 at 2:24
kalan
1,3472122
1,3472122
add a comment |
add a comment |
up vote
3
down vote
It's best to add up the .gitignore list through the development time to prevent unknown side effect when Version Control won't work for some reason because of the pre-defined (copy/paste) list from somewhere. For one of my project, the ignore list is only of:
.gradle
.idea
libs
obj
build
*.log
add a comment |
up vote
3
down vote
It's best to add up the .gitignore list through the development time to prevent unknown side effect when Version Control won't work for some reason because of the pre-defined (copy/paste) list from somewhere. For one of my project, the ignore list is only of:
.gradle
.idea
libs
obj
build
*.log
add a comment |
up vote
3
down vote
up vote
3
down vote
It's best to add up the .gitignore list through the development time to prevent unknown side effect when Version Control won't work for some reason because of the pre-defined (copy/paste) list from somewhere. For one of my project, the ignore list is only of:
.gradle
.idea
libs
obj
build
*.log
It's best to add up the .gitignore list through the development time to prevent unknown side effect when Version Control won't work for some reason because of the pre-defined (copy/paste) list from somewhere. For one of my project, the ignore list is only of:
.gradle
.idea
libs
obj
build
*.log
answered Nov 17 '15 at 20:27
Tim Long
1,06711218
1,06711218
add a comment |
add a comment |
up vote
1
down vote
As of Android Studio 0.8.4 .gitignore file is generated automatically when starting new project. By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
build/
/captures
I agree with this statement, however I modify this file to change
/build to build/
(This will include /build and /app/build)
So I don't end up with all the files in app/build in my repository.
Note also that if you import a project from Eclipse, the .gitignore won't be copied, or "automagically" created for you.
add a comment |
up vote
1
down vote
As of Android Studio 0.8.4 .gitignore file is generated automatically when starting new project. By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
build/
/captures
I agree with this statement, however I modify this file to change
/build to build/
(This will include /build and /app/build)
So I don't end up with all the files in app/build in my repository.
Note also that if you import a project from Eclipse, the .gitignore won't be copied, or "automagically" created for you.
add a comment |
up vote
1
down vote
up vote
1
down vote
As of Android Studio 0.8.4 .gitignore file is generated automatically when starting new project. By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
build/
/captures
I agree with this statement, however I modify this file to change
/build to build/
(This will include /build and /app/build)
So I don't end up with all the files in app/build in my repository.
Note also that if you import a project from Eclipse, the .gitignore won't be copied, or "automagically" created for you.
As of Android Studio 0.8.4 .gitignore file is generated automatically when starting new project. By default it contains:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
build/
/captures
I agree with this statement, however I modify this file to change
/build to build/
(This will include /build and /app/build)
So I don't end up with all the files in app/build in my repository.
Note also that if you import a project from Eclipse, the .gitignore won't be copied, or "automagically" created for you.
edited May 6 '15 at 22:10
answered May 5 '15 at 18:33
guyland123
76174
76174
add a comment |
add a comment |
up vote
1
down vote
I merge Github .gitignore files
- Android.gitignore
- JetBrains.gitignore
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
Please read: JetBrains Support: How to manage projects under Version Control Systems
2
As of 2016, I follow this answer as the most close to our needs. Thanks
– Henrique de Sousa
May 19 '16 at 15:13
add a comment |
up vote
1
down vote
I merge Github .gitignore files
- Android.gitignore
- JetBrains.gitignore
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
Please read: JetBrains Support: How to manage projects under Version Control Systems
2
As of 2016, I follow this answer as the most close to our needs. Thanks
– Henrique de Sousa
May 19 '16 at 15:13
add a comment |
up vote
1
down vote
up vote
1
down vote
I merge Github .gitignore files
- Android.gitignore
- JetBrains.gitignore
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
Please read: JetBrains Support: How to manage projects under Version Control Systems
I merge Github .gitignore files
- Android.gitignore
- JetBrains.gitignore
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
Please read: JetBrains Support: How to manage projects under Version Control Systems
edited Aug 31 '15 at 10:28
answered Aug 31 '15 at 10:17
d.danailov
7,01444230
7,01444230
2
As of 2016, I follow this answer as the most close to our needs. Thanks
– Henrique de Sousa
May 19 '16 at 15:13
add a comment |
2
As of 2016, I follow this answer as the most close to our needs. Thanks
– Henrique de Sousa
May 19 '16 at 15:13
2
2
As of 2016, I follow this answer as the most close to our needs. Thanks
– Henrique de Sousa
May 19 '16 at 15:13
As of 2016, I follow this answer as the most close to our needs. Thanks
– Henrique de Sousa
May 19 '16 at 15:13
add a comment |
up vote
1
down vote
Github maintains useful gitignore items for various kinds of projects.
Here is the list of useful gitignore items for android projects.
# 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/gradle.xml
.idea/libraries
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
Android Gitignore in github
2
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– imtheman
Feb 15 '17 at 6:39
@imtheman plausible.. I have updated the answer and put the link as reference
– Sudip Bhandari
Feb 15 '17 at 6:42
add a comment |
up vote
1
down vote
Github maintains useful gitignore items for various kinds of projects.
Here is the list of useful gitignore items for android projects.
# 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/gradle.xml
.idea/libraries
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
Android Gitignore in github
2
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– imtheman
Feb 15 '17 at 6:39
@imtheman plausible.. I have updated the answer and put the link as reference
– Sudip Bhandari
Feb 15 '17 at 6:42
add a comment |
up vote
1
down vote
up vote
1
down vote
Github maintains useful gitignore items for various kinds of projects.
Here is the list of useful gitignore items for android projects.
# 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/gradle.xml
.idea/libraries
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
Android Gitignore in github
Github maintains useful gitignore items for various kinds of projects.
Here is the list of useful gitignore items for android projects.
# 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/gradle.xml
.idea/libraries
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
Android Gitignore in github
edited Feb 15 '17 at 6:40
answered Feb 15 '17 at 5:08
Sudip Bhandari
7161117
7161117
2
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– imtheman
Feb 15 '17 at 6:39
@imtheman plausible.. I have updated the answer and put the link as reference
– Sudip Bhandari
Feb 15 '17 at 6:42
add a comment |
2
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– imtheman
Feb 15 '17 at 6:39
@imtheman plausible.. I have updated the answer and put the link as reference
– Sudip Bhandari
Feb 15 '17 at 6:42
2
2
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– imtheman
Feb 15 '17 at 6:39
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– imtheman
Feb 15 '17 at 6:39
@imtheman plausible.. I have updated the answer and put the link as reference
– Sudip Bhandari
Feb 15 '17 at 6:42
@imtheman plausible.. I have updated the answer and put the link as reference
– Sudip Bhandari
Feb 15 '17 at 6:42
add a comment |
up vote
0
down vote
Compilation:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Gradle files
.gradle/
build/
/*/build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Eclipse project files
.classpath
.project
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
Why down vote? its working for me..
– Aqib Mumtaz
Jul 12 '16 at 10:53
add a comment |
up vote
0
down vote
Compilation:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Gradle files
.gradle/
build/
/*/build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Eclipse project files
.classpath
.project
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
Why down vote? its working for me..
– Aqib Mumtaz
Jul 12 '16 at 10:53
add a comment |
up vote
0
down vote
up vote
0
down vote
Compilation:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Gradle files
.gradle/
build/
/*/build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Eclipse project files
.classpath
.project
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
Compilation:
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Gradle files
.gradle/
build/
/*/build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Eclipse project files
.classpath
.project
# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
answered May 8 '15 at 12:18
Aqib Mumtaz
3,9022430
3,9022430
Why down vote? its working for me..
– Aqib Mumtaz
Jul 12 '16 at 10:53
add a comment |
Why down vote? its working for me..
– Aqib Mumtaz
Jul 12 '16 at 10:53
Why down vote? its working for me..
– Aqib Mumtaz
Jul 12 '16 at 10:53
Why down vote? its working for me..
– Aqib Mumtaz
Jul 12 '16 at 10:53
add a comment |
up vote
0
down vote
To circumvent the import of all files, where Android Studio ignores the "Ignored Files" list, but still leverage Android Studio VCS, I did the following:
This will use the "Ignored Files" list from Android Studio (after import! not during) AND avoid having to use the cumbersome way Tortoise SVN sets the svn:ignore list.
- Use the Tortoise SVN repository browser to create a new project folder directly in the repository.
- Use Tortoise SVN to checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Ignore the warning. Now you have a versioned top level folder with unversioned content.
- Open your project from the local working directory. VCS should now be enabled automatically
- Set your file exceptions in File -> Settings -> Version Control -> Ignored Files
- Add files to SVN from Android Studio: select 'App' in Project Structure -> VCS -> Add to VCS (this will add all files, except "Ignored Files")
- Commit Changes
Going forward, "Ignored Files" will be ignored and you can still manage VCS from Android Studio.
Cheers,
-Joost
add a comment |
up vote
0
down vote
To circumvent the import of all files, where Android Studio ignores the "Ignored Files" list, but still leverage Android Studio VCS, I did the following:
This will use the "Ignored Files" list from Android Studio (after import! not during) AND avoid having to use the cumbersome way Tortoise SVN sets the svn:ignore list.
- Use the Tortoise SVN repository browser to create a new project folder directly in the repository.
- Use Tortoise SVN to checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Ignore the warning. Now you have a versioned top level folder with unversioned content.
- Open your project from the local working directory. VCS should now be enabled automatically
- Set your file exceptions in File -> Settings -> Version Control -> Ignored Files
- Add files to SVN from Android Studio: select 'App' in Project Structure -> VCS -> Add to VCS (this will add all files, except "Ignored Files")
- Commit Changes
Going forward, "Ignored Files" will be ignored and you can still manage VCS from Android Studio.
Cheers,
-Joost
add a comment |
up vote
0
down vote
up vote
0
down vote
To circumvent the import of all files, where Android Studio ignores the "Ignored Files" list, but still leverage Android Studio VCS, I did the following:
This will use the "Ignored Files" list from Android Studio (after import! not during) AND avoid having to use the cumbersome way Tortoise SVN sets the svn:ignore list.
- Use the Tortoise SVN repository browser to create a new project folder directly in the repository.
- Use Tortoise SVN to checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Ignore the warning. Now you have a versioned top level folder with unversioned content.
- Open your project from the local working directory. VCS should now be enabled automatically
- Set your file exceptions in File -> Settings -> Version Control -> Ignored Files
- Add files to SVN from Android Studio: select 'App' in Project Structure -> VCS -> Add to VCS (this will add all files, except "Ignored Files")
- Commit Changes
Going forward, "Ignored Files" will be ignored and you can still manage VCS from Android Studio.
Cheers,
-Joost
To circumvent the import of all files, where Android Studio ignores the "Ignored Files" list, but still leverage Android Studio VCS, I did the following:
This will use the "Ignored Files" list from Android Studio (after import! not during) AND avoid having to use the cumbersome way Tortoise SVN sets the svn:ignore list.
- Use the Tortoise SVN repository browser to create a new project folder directly in the repository.
- Use Tortoise SVN to checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Ignore the warning. Now you have a versioned top level folder with unversioned content.
- Open your project from the local working directory. VCS should now be enabled automatically
- Set your file exceptions in File -> Settings -> Version Control -> Ignored Files
- Add files to SVN from Android Studio: select 'App' in Project Structure -> VCS -> Add to VCS (this will add all files, except "Ignored Files")
- Commit Changes
Going forward, "Ignored Files" will be ignored and you can still manage VCS from Android Studio.
Cheers,
-Joost
answered Mar 3 at 11:55
Joost
85
85
add a comment |
add a comment |
up vote
0
down vote
.gitignore from AndroidRate library
# Copyright 2017 - 2018 Vorlonsoft LLC
#
# Licensed under The MIT License (MIT)
# Built application files
*.ap_
*.apk
# Built library files
*.aar
*.jar
# Built native files
*.o
*.so
# Files for the Dalvik/Android Runtime (ART)
*.dex
*.odex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk/ndk path, etc)
local.properties
# Windows thumbnail cache
Thumbs.db
# macOS
.DS_Store/
# Log Files
*.log
# Android Studio
.navigation/
captures/
output.json
# NDK
.externalNativeBuild/
obj/
# IntelliJ
## User-specific stuff
.idea/**/tasks.xml
.idea/**/workspace.xml
.idea/dictionaries
## Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/dynamic.xml
.idea/**/sqlDataSources.xml
.idea/**/uiDesigner.xml
## Gradle
.idea/**/gradle.xml
.idea/**/libraries
## VCS
.idea/vcs.xml
## Module files
*.iml
## File-based project format
*.iws
add a comment |
up vote
0
down vote
.gitignore from AndroidRate library
# Copyright 2017 - 2018 Vorlonsoft LLC
#
# Licensed under The MIT License (MIT)
# Built application files
*.ap_
*.apk
# Built library files
*.aar
*.jar
# Built native files
*.o
*.so
# Files for the Dalvik/Android Runtime (ART)
*.dex
*.odex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk/ndk path, etc)
local.properties
# Windows thumbnail cache
Thumbs.db
# macOS
.DS_Store/
# Log Files
*.log
# Android Studio
.navigation/
captures/
output.json
# NDK
.externalNativeBuild/
obj/
# IntelliJ
## User-specific stuff
.idea/**/tasks.xml
.idea/**/workspace.xml
.idea/dictionaries
## Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/dynamic.xml
.idea/**/sqlDataSources.xml
.idea/**/uiDesigner.xml
## Gradle
.idea/**/gradle.xml
.idea/**/libraries
## VCS
.idea/vcs.xml
## Module files
*.iml
## File-based project format
*.iws
add a comment |
up vote
0
down vote
up vote
0
down vote
.gitignore from AndroidRate library
# Copyright 2017 - 2018 Vorlonsoft LLC
#
# Licensed under The MIT License (MIT)
# Built application files
*.ap_
*.apk
# Built library files
*.aar
*.jar
# Built native files
*.o
*.so
# Files for the Dalvik/Android Runtime (ART)
*.dex
*.odex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk/ndk path, etc)
local.properties
# Windows thumbnail cache
Thumbs.db
# macOS
.DS_Store/
# Log Files
*.log
# Android Studio
.navigation/
captures/
output.json
# NDK
.externalNativeBuild/
obj/
# IntelliJ
## User-specific stuff
.idea/**/tasks.xml
.idea/**/workspace.xml
.idea/dictionaries
## Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/dynamic.xml
.idea/**/sqlDataSources.xml
.idea/**/uiDesigner.xml
## Gradle
.idea/**/gradle.xml
.idea/**/libraries
## VCS
.idea/vcs.xml
## Module files
*.iml
## File-based project format
*.iws
.gitignore from AndroidRate library
# Copyright 2017 - 2018 Vorlonsoft LLC
#
# Licensed under The MIT License (MIT)
# Built application files
*.ap_
*.apk
# Built library files
*.aar
*.jar
# Built native files
*.o
*.so
# Files for the Dalvik/Android Runtime (ART)
*.dex
*.odex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk/ndk path, etc)
local.properties
# Windows thumbnail cache
Thumbs.db
# macOS
.DS_Store/
# Log Files
*.log
# Android Studio
.navigation/
captures/
output.json
# NDK
.externalNativeBuild/
obj/
# IntelliJ
## User-specific stuff
.idea/**/tasks.xml
.idea/**/workspace.xml
.idea/dictionaries
## Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/dynamic.xml
.idea/**/sqlDataSources.xml
.idea/**/uiDesigner.xml
## Gradle
.idea/**/gradle.xml
.idea/**/libraries
## VCS
.idea/vcs.xml
## Module files
*.iml
## File-based project format
*.iws
edited Mar 16 at 12:31
answered Mar 16 at 12:18
Alexander Savin
504419
504419
add a comment |
add a comment |
up vote
0
down vote
https://github.com/github/gitignore is awesome collection
Android.gitignore
# 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/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
add a comment |
up vote
0
down vote
https://github.com/github/gitignore is awesome collection
Android.gitignore
# 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/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
add a comment |
up vote
0
down vote
up vote
0
down vote
https://github.com/github/gitignore is awesome collection
Android.gitignore
# 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/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
https://github.com/github/gitignore is awesome collection
Android.gitignore
# 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/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
answered Jul 17 at 17:01
shellhub
58448
58448
add a comment |
add a comment |
up vote
-1
down vote
This official documentation from JetBrains Support says the following should be included:
All files under .idea directory except workspace.xml and tasks.xml because
they store specific user settings
All the *.iml files that can be located in different module directories
It also gives other recommendations of things to be careful about.
1
Why was this voted down? Vote downs with no explanation are the worst thing about SO.
– craned
Jul 9 '16 at 22:53
add a comment |
up vote
-1
down vote
This official documentation from JetBrains Support says the following should be included:
All files under .idea directory except workspace.xml and tasks.xml because
they store specific user settings
All the *.iml files that can be located in different module directories
It also gives other recommendations of things to be careful about.
1
Why was this voted down? Vote downs with no explanation are the worst thing about SO.
– craned
Jul 9 '16 at 22:53
add a comment |
up vote
-1
down vote
up vote
-1
down vote
This official documentation from JetBrains Support says the following should be included:
All files under .idea directory except workspace.xml and tasks.xml because
they store specific user settings
All the *.iml files that can be located in different module directories
It also gives other recommendations of things to be careful about.
This official documentation from JetBrains Support says the following should be included:
All files under .idea directory except workspace.xml and tasks.xml because
they store specific user settings
All the *.iml files that can be located in different module directories
It also gives other recommendations of things to be careful about.
answered Dec 11 '14 at 16:48
craned
2,14122132
2,14122132
1
Why was this voted down? Vote downs with no explanation are the worst thing about SO.
– craned
Jul 9 '16 at 22:53
add a comment |
1
Why was this voted down? Vote downs with no explanation are the worst thing about SO.
– craned
Jul 9 '16 at 22:53
1
1
Why was this voted down? Vote downs with no explanation are the worst thing about SO.
– craned
Jul 9 '16 at 22:53
Why was this voted down? Vote downs with no explanation are the worst thing about SO.
– craned
Jul 9 '16 at 22:53
add a comment |
up vote
-1
down vote
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
add a comment |
up vote
-1
down vote
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
add a comment |
up vote
-1
down vote
up vote
-1
down vote
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
### Github Android.gitignore ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# 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/
### Github JetBrains.gitignore ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## 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
answered May 29 at 9:08
Arun Ganessh
62
62
add a comment |
add a comment |
up vote
-3
down vote
I had problems with ignoring build files, but this seems to work :-)
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Android Studio
.idea/
.gradle
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.iml
*.iws
*.ipr
*~
*.swp
*/build
*/production
*/local.properties
*/out
add a comment |
up vote
-3
down vote
I had problems with ignoring build files, but this seems to work :-)
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Android Studio
.idea/
.gradle
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.iml
*.iws
*.ipr
*~
*.swp
*/build
*/production
*/local.properties
*/out
add a comment |
up vote
-3
down vote
up vote
-3
down vote
I had problems with ignoring build files, but this seems to work :-)
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Android Studio
.idea/
.gradle
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.iml
*.iws
*.ipr
*~
*.swp
*/build
*/production
*/local.properties
*/out
I had problems with ignoring build files, but this seems to work :-)
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Android Studio
.idea/
.gradle
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.iml
*.iws
*.ipr
*~
*.swp
*/build
*/production
*/local.properties
*/out
answered Sep 9 '13 at 7:41
user2760628
1
1
add a comment |
add a comment |
protected by Phil Aug 24 at 19:16
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
5
github.com/github/gitignore
– Yousha Aleayoub
Mar 6 '17 at 15:03