We work in a group and send large amounts of data daily, which is why the .git folder becomes very heavy in size. And when you execute the pull command on our system, it takes a lot of time due to the large size of the .git folder. How can we clean or reduce the size of this git repo?
You need to determine if there is something inherently big in your repository - for example, too many large binaries - or if garbage collection fixes it.
Collect garbage, see how big your repo is.
, Atlassian, @sauerburger, Google, , .
( .)
.git, , , .
.git
, , !
(fooobar.com/questions/814546/...):
, , branchname. , , , reset , - ( , , ):git tag temp git checkout 10004 git checkout --orphan new_root git commit -m "set new root 10004" git rebase --onto new_root 10004 branchname git diff temp # verification that it worked with no changes git tag -d temp git branch -D new_root , ;git prune git gc ., , gc 'd, ; rebase , .
, , branchname. , , , reset , - ( , , ):
branchname
reset
git tag temp git checkout 10004 git checkout --orphan new_root git commit -m "set new root 10004" git rebase --onto new_root 10004 branchname git diff temp # verification that it worked with no changes git tag -d temp git branch -D new_root
, ;
git prune git gc
.
, , gc 'd, ; rebase , .
gc
Source: https://habr.com/ru/post/1684389/More articles:Is there a way to enable support for optional chaining operators in WebStorm - javascriptSeamless alignment with different types, but with the same labels - scalaCannot remove diacritics from file name - javascriptMd-menu closes after pressing md-tab inside - htmlHack authentication usind response-dev-tools - authenticationScaling font size in xamarin formats - layoutCan I override a macro from the standard library using my own custom macro? - macrosJW player assigns file via variable - javascriptOffline Debugging of .NET Core / Full CLR Applications - debuggingA faster method than the while loop is to find the infection chain in R - performanceAll Articles