Linked Questions
67 questions linked to/from Reduce Git repository size
2
votes
2
answers
1k
views
Git repository is too large, even after deleting all old commits [duplicate]
so I work on a branch of a master git repository, which is now 4 GB large, because I once pushed raw data by mistake.
So what I did is to use git reset--hard@(10) to go back 10 commits and then used ...
0
votes
0
answers
66
views
git remove local branch not releasing space in harddisk [duplicate]
Because my git branch will use a lot of Space, so I have deleted many local branches in my local git directory by issues
git branch -D xxxx
However, no space is free up in my hardisk. I run git gc ...
0
votes
0
answers
61
views
GIT-how to reduce the size of repository but keep all code [duplicate]
My repository is big after years, so I would like to make it smaller, but i don't know what is the best approach. I would like to delete the older half of my repository, but it must not affect the ...
1
vote
0
answers
42
views
Cleaning up git repositories [duplicate]
We have a git repo of 500MB large. Now it turns out that somewhere in the history a few unneeded files of 50MB - 75MB were added and removed after. To make the repo smaller I've decided to rewrite the ...
4743
votes
43
answers
2.0m
views
How do I remove a submodule?
How do I remove a Git submodule?
Why can't I do
git submodule rm module_name?
2018
votes
26
answers
334k
views
Detach (move) subdirectory into separate Git repository
I have a Git repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository.
How can I ...
314
votes
11
answers
211k
views
How to shrink the .git folder
My current base has a total size of approx. 200MB.
But my .git folder has an amazing size of 5GB (!). Since I push my work to an external server, i don't need any big local history...
How can I shrink ...
173
votes
12
answers
147k
views
How to remove unreferenced blobs from my Git repository
I have a GitHub repository that had two branches - master and release.
The release branch contained binary distribution files that were contributing to a very large repository size (more than 250 MB), ...
165
votes
15
answers
127k
views
Why is my Git repository so big (folder '.git')?
Consider:
145M = .git/objects/pack/
I wrote a script to add up the sizes of differences of each commit and the commit before it, going backwards from the tip of each branch. I get 129 MB, which is ...
186
votes
7
answers
216k
views
Is there a way to reduce the size of the Git folder?
It seems like my project is getting bigger and bigger with every Git commit/push. Is there a way to clean up my Git folder?
213
votes
7
answers
251k
views
Remove large .pack file created by Git
I checked a load of files into a branch and merged. And then I had to remove them and now I'm left with a large .pack file that I don't know how to get rid of.
I deleted all the files using git rm -rf ...
117
votes
9
answers
95k
views
How to remove unused objects from a git repository?
I accidentally added, committed and pushed a huge binary file with my very latest commit to a Git repository.
How can I make Git remove the object(s) that was/were created for that commit so my .git ...
130
votes
5
answers
100k
views
How can I clean my .git folder? Cleaned up my project directory, but .git is still massive
The .git/objects in my rails project directory is still massive, after deleting hundreds of Megabytes of accidentally generated garbage.
I have tried git add -A, as well as other commands to ...
39
votes
19
answers
68k
views
Git pull error: unable to create temporary sha1 filename
I've got a small git repo setup with the only real purpose to be able to develop locally on several machines (work, home, laptop). Thus I have one branch and I commit/push once I leave a computer, ...
90
votes
8
answers
174k
views
What is the .git folder?
What is the folder called .git?
It's created in a repository. What is contained within it and why is it created?