-
Notifications
You must be signed in to change notification settings - Fork 54
Consider cleaning up the .git folder to reduce the large repo size #439
Comments
Nice, thanks for the tips! My inclination is that it's not bad enough to warrant rebasing all of the history, but will wait on a 👍 👎 from someone else on the team. |
Agree w @afeld -- cool to have the info but I am not too concerned about this at the moment. Closing. |
@monfresh It dd'nt help me |
@monfresh : Thanks, It worked perfectly for me. |
Hello I have huge folder size under object folder but for some folder with numbers from 1 to 90. the pack fodler is about 50 MB but the rest are about 600 MB. Can I just delete those folders? Note that this is a fork repository. Thanks |
what about cleaning up the stuff from deleted files to look like they never existed of those files was the root cause of the large size and then later deleted to try to reduce clone time but dont want to loose all history? I got 1 such repo, try to see how long it takes for you to clone this one: https://github.com/DecoraterBot-devs/DecoraterBot |
@monfresh thanks lot, it works great for me. But, won't this will rewrite entire history and mess other fork ? |
And this one worked for me: |
If you want to clean all previous commit and thin up your repo.
|
I did the steps as @monfresh suggested and recovered a lot of space on my local machine. But how can I integrate the changes with the remote on github.com? When I try to push new commits, it says the remote contains that I don't have locally. So I did git pull, but now my local repository is back to its original size before cleaning up. |
in that case simply doing a |
Ya I did |
A "one-liner"
|
how to clean the .git folder that has commits older than a specific date? (for example older than 1 month) |
I tried this and I was able to reduce my size-pack from 243456 to 1937. I then do aa git push --force it uploads but then when I do a git clone on a different machine I still have the old size-pack. I can't get it to reflect on github |
This issue is for the C2 application specifically - I suggest taking the broader conversation elsewhere, such as this StackOverflow question. Thanks! |
Hi. I just cloned this repo and it ended up being 83MB. The biggest file is a 77MB pack in
.git/objects/pack
.To see the 10 biggest files, run this from the root directory:
To see what each file is, run this:
Most of the files are
.png
, and the last one in the list is a.mov
, which I would guess takes up most of the space. There are also.csv
and.pdf
files. The next step would be to clean up your git by removing all of those unnecessary files.One option is to use the bfg-repo-cleaner tool, which worked great for me on other repos I've tried it on.
Alternatively, you could do it manually following this git article, as outlined below:
Then repeat with other types of files.
Then verify:
Your
size-pack
should be a lot smaller now.The text was updated successfully, but these errors were encountered: