[英]rsync git big repository
我正在嘗試將git存儲庫克隆到我的本地計算機上,但它說“ malloc failed
”,因為存儲庫太大了。
有誰知道我可以用來復制目錄的確切rsync命令? 或者我還能做些什么來克隆大型存儲庫?
我試過rsyncing但它給了我以下錯誤:
Invalid command: 'rsync --server --sender -v . username/dir.git'
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(463) [receiver=2.6.8]
嘗試使用git clone時出現以下錯誤:
remote: Counting objects: 52708, done.
remote: Compressing objects: 100% (52188/52188), done.
fatal: Out of memory, malloc failed (tried to allocate 1471836719 bytes)
fatal: index-pack failed
只需使用更新版本的git
。 較新的版本可以處理這個問題。 或者,如果您已經使用新版本,請將git config core.bigFileThreshold
設置為較小的大小。
嘗試使用ulimit允許git進程使用更多內存。
如果你有一個非常大的文件,我不認為你有任何其他選擇,但試圖從你的回購中刪除它,假設:
請參閱Pro Git一書中的“從每個提交中刪除文件”部分 。
git filter-branch --tree-filter 'rm -f bigFile' -- --all
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.