1

I have an existing android project and tried adding it to the GitHub repo but it rejects stating the file is too large.

The project itself is quite small but I found that only 3 directories contributed the most size . The directories are present in the root directory of the project which is caches, daemon, wrapper constituting around 4Gb of size

enter image description here

What I tried :

---> adding the directories to .gitignore (seems to not work)

My Questions :

---> Can I delete the directories if they're not of any significance?

---> I added the directories to .gitignore by the following formats for example /caches/ and /caches and caches/ yet they stay unignored, am I doing this right?

I prefer not to go with Git LFS (Large file storage) since this is fairly a small project.

Thanks in advance :).

  • 1
    `So, I can now doubtlessly delete those 3 directories (caches ,daemon ,wrapper) right , not fearing it would cause havoc ? ` one way you can be sure is to investigate a build server. there are lots of free options available, what it will do is basically build your project once you push your code to github, then it will report if the build succeeded or failed. if a build is successful on a build server, chances are it will work for anyone who clones the project as well – a_local_nobody Nov 05 '21 at 12:43

1 Answers1

2

Yes you can delete unnecessary folders.

For why the .gitignore does not work see here. Basically you started tracking the files before you add them to .gitignore (probably)

  • yea , seems that is the case . So, I can now doubtlessly delete those 3 directories (caches ,daemon ,wrapper) right , not fearing it would cause havoc ? – Samantha D'Souza Nov 05 '21 at 09:15
  • it seems so from reading this https://medium.com/back-market-engineering/put-your-android-studio-on-a-diet-fa4d364acb05 –  Nov 05 '21 at 10:10