Git gets stuck while writing objects

I try git push --alland it just freezes when writing objects

10.0-final-project git:(master) ✗ git push --all
Counting objects: 134, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (129/129), done.
Writing objects:  32% (44/134), 321.56 MiB | 231.00 KiB/s

321.56 MiB and 231.00 KiB / s continue to grow.

I tried to use git config --global http.postBufferandgit config --global sendpack.sideband false

Nothing works. What is the way to solve this problem?

+4
source share
2 answers

It looks like you have added the binaries or the HUGE folder to GIT.

This is not what you should do with GIT.

If so, consider solutions such as: Git Large file storage

Another relative article can be found here with some sample code for clearing a repo.


Step 1. Identify the large files.

, , . , , , . Mac.

git rev-list master | while read rev; do git ls-tree -lr $rev | cut -c54- |     grep -v '^ '; done | sort -u | perl -e '
  while (<>) {
      chomp;
      @stuff=split("\t");
      $sums{$stuff[1]} += $stuff[0];
  }
  print "$sums{$_} $_\n" for (keys %sums);
 ' | sort -rn >> large_files.txt

2: , .

. large_files.txt - , , :

git filter-branch --tree-filter 'rm -rf `cat /full/path/to/large_files.txt |
    cut -d " " -f 2` ' --prune-empty <BRANCHES>
+2

. , .

+2

Source: https://habr.com/ru/post/1622830/


All Articles