Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please use github releases instead of placing binary assets in the git repo #35

Closed
falkTX opened this issue Jul 2, 2021 · 5 comments
Closed

Comments

@falkTX
Copy link

falkTX commented Jul 2, 2021

Right now cloning this repo takes a very long time, it is at 133Mb in size.
This is really suboptimal, source code should not take this much space.. the culprit is the bin/ directory, where you upload zip files to.

Please stop placing such files inside the git repo, and place them as proper github releases.
Otherwise when cloning the repo, we are going to be downloading these and older files every single time, this is very wasteful.

git keeps history of all files ever uploaded in the repo, so this can only get worse...

@jatinchowdhury18
Copy link
Owner

Ah thanks for reminding me about this! My brother had explained the same thing to me a little while ago, but it must have slipped my mind. The bin/ directory has now been removed (and ignored) from the current source tree. Do you know if there's a way to tell git to ignore the bin/ folder from previous versions when cloning the repository for the first time? (I'm guessing it's not possible based on my understanding of git, but figured I'd ask just in case).

@falkTX
Copy link
Author

falkTX commented Jul 2, 2021

You can delete commits from history which would remove the offending files. I never attempted this, so dont know how feasable it is, but know it is not a really straight forward thing.

Worst case you can recreate the repo from scratch.

@jatinchowdhury18
Copy link
Owner

Gotcha... Yeah, I'll go back and try to retro-actively remove/amend any commits that touch the bin/ directory. I'll have to be careful though, and make sure I don't accidentally remove something important. I'll try to do the same thing with most of my other repos as well.

Thanks,
Jatin

@jatinchowdhury18
Copy link
Owner

Okay great, I was able to remove the bin/ directory from the entire git history. For my own future reference, here's the script that I used: https://stackoverflow.com/a/32886427.

Kind of cool to see the size improvement:

# before cleanup
$ git count-objects -vH
count: 0
size: 0 bytes
in-pack: 5015
packs: 1
size-pack: 345.53 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

# after cleanup
$ git count-objects -vH
count: 0
size: 0 bytes
in-pack: 4983
packs: 1
size-pack: 161.72 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

@falkTX
Copy link
Author

falkTX commented Jul 7, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants