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

6 messages from 2021-02-01 to 2021-02-01. Participants: Hongyi Zhao, 胡哲宁, Michal Suchánek.
Thread: https://gitlist.dev/t/55081

## Hongyi Zhao, 2021-02-01 02:14

Subject: Recover a git repo after accidentally deleting some hash files located under .git/objects.
Message-ID: <CAGP6POKSOaaq0A-L2RgQ+R+bJVo-KuZChEOcCuO8jP+Cm9QFPw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGP6POKSOaaq0A-L2RgQ%2BR%2BbJVo-KuZChEOcCuO8jP%2BCm9QFPw%40mail.gmail.com

```
Hi,

I accidentally deleted some hash files located under the project's
.git/objects subdirectory. In this case, can I resume the project?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China

```

## 胡哲宁, 2021-02-01 05:56

Subject: Re: Recover a git repo after accidentally deleting some hash files located under .git/objects.
Message-ID: <CAOLTT8SsmzNNvQHaP3+vQmuq0fdRbFNL8ukOvPW5Zw9+nPk32Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLTT8SsmzNNvQHaP3%2BvQmuq0fdRbFNL8ukOvPW5Zw9%2BnPk32Q%40mail.gmail.com
In-Reply-To: <CAGP6POKSOaaq0A-L2RgQ+R+bJVo-KuZChEOcCuO8jP+Cm9QFPw@mail.gmail.com>

```
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.
By the way ,you can ask questions in irc chatroom #git or #git-devel.
There will be a good place to get help.
--
adlternative

Hongyi Zhao <hongyi.zhao@gmail.com> 于2021年2月1日周一 上午10:16写道：
>
> Hi,
>
> I accidentally deleted some hash files located under the project's
> .git/objects subdirectory. In this case, can I resume the project?
>
> Regards
> --
> Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
> Theory and Simulation of Materials
> Hebei Polytechnic University of Science and Technology engineering
> NO. 552 North Gangtie Road, Xingtai, China

```

## Hongyi Zhao, 2021-02-01 07:01

Subject: Re: Recover a git repo after accidentally deleting some hash files located under .git/objects.
Message-ID: <CAGP6POKB1b=gCjd-rNCYrJKcp8bmRP_cpwAPi81udh61ZdZJzA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGP6POKB1b%3DgCjd-rNCYrJKcp8bmRP_cpwAPi81udh61ZdZJzA%40mail.gmail.com
In-Reply-To: <CAOLTT8SsmzNNvQHaP3+vQmuq0fdRbFNL8ukOvPW5Zw9+nPk32Q@mail.gmail.com>

```
On Mon, Feb 1, 2021 at 1:54 PM 胡哲宁 <adlternative@gmail.com> 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.
> By the way ,you can ask questions in irc chatroom #git or #git-devel.
> There will be a good place to get help.

Thanks a lot for your suggestion. BTW, what's IRC client and server
used by you normally?

> --
> adlternative
>
> Hongyi Zhao <hongyi.zhao@gmail.com> 于2021年2月1日周一 上午10:16写道：
> >
> > Hi,
> >
> > I accidentally deleted some hash files located under the project's
> > .git/objects subdirectory. In this case, can I resume the project?
> >
> > Regards
> > --
> > Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
> > Theory and Simulation of Materials
> > Hebei Polytechnic University of Science and Technology engineering
> > NO. 552 North Gangtie Road, Xingtai, China



-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China

```

## 胡哲宁, 2021-02-01 07:31

Subject: Re: Recover a git repo after accidentally deleting some hash files located under .git/objects.
Message-ID: <CAOLTT8ScAgJFo8UxzXvVCX7ojk5fpc6eYxuUg-gJr=--LOzujw@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLTT8ScAgJFo8UxzXvVCX7ojk5fpc6eYxuUg-gJr%3D--LOzujw%40mail.gmail.com
In-Reply-To: <CAGP6POKB1b=gCjd-rNCYrJKcp8bmRP_cpwAPi81udh61ZdZJzA@mail.gmail.com>

```
oh,I am using Konversation,it's a good irc client.
You can also use weechat in terminal.
And http://quhno.internetstrahlen.de/Vivaldi/freenode-help.html
may have many helpful usages for you to learn irc command.

说句中文活跃下气氛 :）

Hongyi Zhao <hongyi.zhao@gmail.com> 于2021年2月1日周一 下午3:01写道：
>
> On Mon, Feb 1, 2021 at 1:54 PM 胡哲宁 <adlternative@gmail.com> 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.
> > By the way ,you can ask questions in irc chatroom #git or #git-devel.
> > There will be a good place to get help.
>
> Thanks a lot for your suggestion. BTW, what's IRC client and server
> used by you normally?
>
> > --
> > adlternative
> >
> > Hongyi Zhao <hongyi.zhao@gmail.com> 于2021年2月1日周一 上午10:16写道：
> > >
> > > Hi,
> > >
> > > I accidentally deleted some hash files located under the project's
> > > .git/objects subdirectory. In this case, can I resume the project?
> > >
> > > Regards
> > > --
> > > Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
> > > Theory and Simulation of Materials
> > > Hebei Polytechnic University of Science and Technology engineering
> > > NO. 552 North Gangtie Road, Xingtai, China
>
>
>
> --
> Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
> Theory and Simulation of Materials
> Hebei Polytechnic University of Science and Technology engineering
> NO. 552 North Gangtie Road, Xingtai, China

```

## Michal Suchánek, 2021-02-01 09:51

Subject: Re: Recover a git repo after accidentally deleting some hash files located under .git/objects.
Message-ID: <20210201095143.GO6564@kitsune.suse.cz>
URL: https://gitlist.dev/e/20210201095143.GO6564%40kitsune.suse.cz
In-Reply-To: <CAOLTT8SsmzNNvQHaP3+vQmuq0fdRbFNL8ukOvPW5Zw9+nPk32Q@mail.gmail.com>

```
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.

Thanks

Michal

```

## 胡哲宁, 2021-02-01 10:02

Subject: Re: Recover a git repo after accidentally deleting some hash files located under .git/objects.
Message-ID: <CAOLTT8TPucR2PRUqE1C9a+vB_-vw=4caycwPixzmJTkkOKpXRw@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLTT8TPucR2PRUqE1C9a%2BvB_-vw%3D4caycwPixzmJTkkOKpXRw%40mail.gmail.com
In-Reply-To: <20210201095143.GO6564@kitsune.suse.cz>

```
Michal Suchánek <msuchanek@suse.de> 于2021年2月1日周一 下午5:51写道：
>
> 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

```
