Which are the files that I have to ignore when adding a project to git? Should I add the .classpath file? What is the purpose of .classpath? Im using eclipse and pushing to a Jenkins server
You can directly import GitHub projects into Android Studio. File -> New -> Project from Version Control -> GitHub. Then enter your GitHub username and password. Select the repository and hit clone.
Step 4: To install Git in Android Studio, we have to build a repository on GitHub first. Step 5: Now coming back to Android Studio, click on “VCS” (Version Control Systems) and then click on “Enable Version Control Integration”. Step 6: Then on selecting a version control, click “Git” and then “Ok”.
Typical gitignore file for android would include this:
# 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
From Gitignore on github
While creating a project in Eclipse, by default it creates a .classpath file in the project directory. That file will be used for storing file names and other dependent files needed in the classpath to compile and execute the project successfully. Normally this file will be updated automatically when ever you update the project libraries etc.
You should add it to git in my opinion. See this thread for more:
.classpath and .project - check into version control or not?
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