修复丢失的提交 [英] Fix missing commit
问题描述
我是Git的新手。我们使用Bonobo Git Server作为后端,使用TortoiseGit作为客户端。当我做一个pull时,我在TortoiseGit中得到以下内容 -
POST git-upload-pack(328字节)
致命错误:协议错误:坏行长度字符:<!DO
致命错误:写入错误:无效参数
git未完全退出(退出代码1)
倭黑猩猩的错误日志说 -
GitSharp.Core.Exceptions.MissingObjectException:缺少提交提交903228ffc07ea920fd944c6fcdd5d8d5ef852ff1 0 ------
我在 .git \objects
文件夹下找到了一个开发人员机器上缺少的 903228ffc07ea920fd944c6fcdd5d8d5ef852ff1
文件。我怎么把这个放在服务器上并让repo再次工作?请帮助。
我在另一个线程上阅读,我需要 repack
它并将其推送到服务器?我怎么做?我是Git的新手。我使用Windows。
然后,只需将良好的文件复制到服务器上的 git / objects / 90/3228 ...
。
请参阅 如果有很多丢失的对象,您确实可以将它们发送到一个包中: 在服务器上,查找缺少对象的SHA-1总和 在开发者的机器上,打包丢失的对象 在服务器上,解包pack文件 I'm new to Git. We're using Bonobo Git Server as the back-end and TortoiseGit for the client. When I do a pull I get the following in TortoiseGit - Bonobo's error log says - I've found the missing I read on a different thread that I need to First backup the corrupted repository in case you make things worse. Then just copy the good file to See Recovering from repository corruption for more information. If there are lots of missing objects you can indeed send them in a pack: On the server, find the SHA-1 sums of the missing objects On the developer's machine, pack the missing objects On the server, unpack the pack file
这篇关于修复丢失的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
git fsck | grep缺少| grep -o'[0-9a-f] \ {40 \}'>缺少
git pack-objects --stdout<缺失> objects.pack
git unpack-objects< objects.pack
POST git-upload-pack (328 bytes)
fatal: protocol error: bad line length character: <!DO
fatal: write error: Invalid argument
git did not exit cleanly (exit code 1)
GitSharp.Core.Exceptions.MissingObjectException: Missing commit commit 903228ffc07ea920fd944c6fcdd5d8d5ef852ff1 0 ------
903228ffc07ea920fd944c6fcdd5d8d5ef852ff1
file on one of the developer's machines under .git\objects
folder. How do I put this on the server and get the repo working again? Please help.repack
it and push it to the server? How do I do that? I'm a newbie at Git. I'm using Windows.git/objects/90/3228...
on the server.
git fsck | grep missing | grep -o '[0-9a-f]\{40\}' > missing
git pack-objects --stdout < missing > objects.pack
git unpack-objects < objects.pack