当对大型Subversion存储库运行git svn clone或git svn fetch (100k+提交)时,定期停止以下操作:
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: The last gc run reported the following. Please correct the root cause and remove .git/gc.log.
Automatic cleanup will not be performed until the file is removed.
warning: There are too many unreachable loose objects; run 'git prune' to remove them.
gc --auto: command returned error: 255为了恢复,我必须按照指示运行一个更积极的剪枝和gc,删除日志文件并继续,但是在另一批(例如10k提交)被读取之后,它才会再次发生。
如何避免这个问题呢?
发布于 2018-11-02 21:02:44
开始看到关于git拉的警告:
$ git pull
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 22 (delta 17), reused 22 (delta 17), pack-reused 0
Unpacking objects: 100% (22/22), done.
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log.
Automatic cleanup will not be performed until the file is removed.
warning: There are too many unreachable loose objects; run 'git prune' to remove them.
Already up-to-date.查看警告文件,这里不多:
$ cat .git/gc.log
warning: There are too many unreachable loose objects; run 'git prune' to remove them.阅读帮助:
$ git help gc听起来我们应该定期做这件事
运行偶尔推荐的激进选项。
$ git gc --aggressive
Counting objects: 41544, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (40544/40544), done.
Writing objects: 100% (41544/41544), done.
Total 41544 (delta 30536), reused 7801 (delta 0)
Removing duplicate objects: 100% (256/256), done.
Checking connectivity: 46959, done.删除日志警告:
$ rm .git/gc.log 微笑
:)https://stackoverflow.com/questions/35738680
复制相似问题