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?

Francisco Romero
  • 12,787
  • 22
  • 92
  • 167

1 Answers1

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.

António Almeida
  • 9,620
  • 8
  • 59
  • 66
  • Yes, I also have seen this webpage: https://www.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. – Francisco Romero Feb 21 '18 at 20:05
  • 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... – António Almeida Feb 21 '18 at 20:14