I'm working on an Android group project, and have been running into issues with Eclipse's .metadata folder and git.
Originally, I didn't include the .metadata folder, which caused one teammate's eclipse workspace to completely break. The projects wouldn't show up in the package explorer, and the SDK couldn't be found. I am working under OSX and they're on Windows. So then I included the .metadata folder, and that fixed the problem with the projects not being found, but the commits are a nightmare! There are always thousands of insertions/deletions and the SDK is found, but it points to the wrong place.
Another issue is bin/ and gen/ files still show up as added/modified in Git. I know I'm missing something that is probably very obvious.
My .gitignore
# Trying to get bin/gen to not show up in Windows
AllTests/bin
AllTests/gen
Fire-Alert/bin
Fire-Alert/gen
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
target/
/bin
/gen
# Local configuration file (sdk path, etc)
local.properties
# Mac .DS_Store files
.DS_Store
File structure of my Eclipse workspace:
├── .git
│ ├── branches
│ ├── hooks
│ ├── info
│ ├── logs
│ ├── objects
│ └── refs
├── .metadata
│ └── .plugins
├── AllTests
│ ├── .settings
│ ├── assets
│ ├── bin
│ ├── gen
│ ├── res
│ └── src
└── Fire-Alert
├── .metadata
├── .settings
├── assets
├── bin
├── gen
├── libs
├── res
└── src
I don't have .metadata in my Android projects managed with Git and Eclipse. I don't think you need it.
As per bin/ and gen/ files showing up as added/modified in Git... It would seem they were inadvertently added to version control. You can remove them with:
git rm --cached bin/ gen/
git commit -m 'cleaning up bin/ and gen/'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With