0

I want to versionate an Android project with git but I am wondering what is mandatory to add to git repository.

I know about .gitignore file and I also have read this question: What should be in my .gitignore for an Android Studio project? but I have seen that there are a lot of different opinions about what should I add or remove from .gitignore file.

My question is not so open, I just want to know what is mandatory add to git repository, I mean that if I create a new project, versionate it and clone that repo in another computer, the project will work without problems.

Just the needed files I need to make my Android git project works in other computer when I clone my git repository. I am using Android Studio.

So, what files are mandatory to versionate on Android git project?

1 Answer 1

1

There is a great github project that includes gitignore files for every kind of project.

There is one for Android. https://github.com/github/gitignore/blob/master/Android.gitignore

I always use this for my projects.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes, I also have seen this webpage: gitignore.io but I think there are folders that are not by default, so I would want to know what is mandatory to add at first time you create a project, I want try to avoid to make a big .gitignore file and just add necesary files accurate to my project.
I understand your point, in my case, as I work with more people, I always prefer to have as much as possible in the gitignore file, because you never know if your mate is going to add a bunch of unnecessary, and eventually heavy stuff that will be in the git history forever. And we're talking about 2 or 3kb of text, it's not as much as that. It can save a few Mb in the future...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.