Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding android project to git

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

like image 682
user1796624 Avatar asked Dec 04 '12 10:12

user1796624


People also ask

How do I open an Android project from GitHub?

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.

Does Git work with Android Studio?

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”.


1 Answers

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?

like image 86
Anup Cowkur Avatar answered Oct 26 '22 22:10

Anup Cowkur