git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Recover a git repo after accidentally deleting some hash files located under .git/objects.

From
胡哲宁 <adlternative@gmail.com>
Date
Feb 1, 2021, 10:02 UTC
Message-ID
<CAOLTT8TPucR2PRUqE1C9a+vB_-vw=4caycwPixzmJTkkOKpXRw@mail.gmail.com>
In-Reply-To
<20210201095143.GO6564@kitsune.suse.cz>
Michal Suchánek <msuchanek@suse.de> 于2021年2月1日周一 下午5:51写道:
Show 12 quoted lines
>
> On Mon, Feb 01, 2021 at 01:56:55PM +0800, 胡哲宁 wrote:
> > Hi,I don't think so unless you have the commit
> >  in github or gitlab which include this file,
> > maybe you can use git pull to get it.
> How?
>
> fetch/pull complains that the hashes are missing.
>
> In this situation I just delete the repository but it is kind of stupid
> that git rells you exactly what is wrong but won't fix it.
>

Is it so? I thought it would work normally, and I hope git can fix it one day. Thanks.

ZheNing Hu
> Thanks
>
> Michal
Previous: Michal Suchánek
Message 6 of 6 in “Recover a git repo after accidentally deleting some hash files located under .git/objects.”
  1. Hongyi ZhaoFeb 1, 2021
  2. 胡哲宁Feb 1, 2021
  3. Hongyi ZhaoFeb 1, 2021
  4. 胡哲宁Feb 1, 2021
  5. Michal SuchánekFeb 1, 2021
  6. 胡哲宁Feb 1, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.