Skip to main content
added 503 characters in body
Source Link
David Dehghan
  • 25.3k
  • 11
  • 113
  • 101

Here is what the creator of git Linus has to say about how to shrink your git repo:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

Will this get rid of binary data that is orphaned in my repo? "git repack" will not git rid of images or binary data that you have checked into your repo and then deleted it. To delete those kind of data permanently from your repo you have to re-write your history. A common example of that is when you accidentally check in your passwords in git. You can go back and delete some files but then you have to re-write your history from then to now and then force push then new repo to your origin.

Here is what the creator of git Linus has to say about how to shrink your git repo:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

Here is what the creator of git Linus has to say about how to shrink your git repo:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

Will this get rid of binary data that is orphaned in my repo? "git repack" will not git rid of images or binary data that you have checked into your repo and then deleted it. To delete those kind of data permanently from your repo you have to re-write your history. A common example of that is when you accidentally check in your passwords in git. You can go back and delete some files but then you have to re-write your history from then to now and then force push then new repo to your origin.

added 45 characters in body
Source Link
David Dehghan
  • 25.3k
  • 11
  • 113
  • 101

Here is what to do fromthe creator of git Linus himselfhas to say about how to shrink your git repo:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

Here is what to do from Linus himself:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

Here is what the creator of git Linus has to say about how to shrink your git repo:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

added 27 characters in body
Source Link
David Dehghan
  • 25.3k
  • 11
  • 113
  • 101

FromHere is what to do from Linus himself:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

From Linus:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

Here is what to do from Linus himself:

The equivalent of "git gc --aggressive" - but done *properly* - is to do (overnight) something like

 git repack -a -d --depth=250 --window=250 

where that depth thing is just about how deep the delta chains can be (make them longer for old history - it's worth the space overhead), and the window thing is about how big an object window we want each delta candidate to scan.

And here, you might well want to add the "-f" flag (which is the "drop all old deltas", since you now are actually trying to make sure that this one actually finds good candidates.

source: http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html

The answer is a 100% direct quote from Linus but wasn't attributed
Source Link
Loading
Source Link
David Dehghan
  • 25.3k
  • 11
  • 113
  • 101
Loading