Subject: Re: Retrieving a file in git that was deleted and committed

From: Sergey Organov <[email-masked]>
Date: Mon, 10 Dec 2018 18:12:06 +0300

biswaranjan panda <[email-masked]> writes:

> I have the following scenario:
>
> On a branch A, I deleted a file foo.txt and committed the change. Then
> I did a bunch of other changes.
> Now I want to undelete foo.txt.

[...]

> I would appreciate if anyone knows how to preserve git blame history.

Provided you deleted the file by mistake and you didn't yet publish the
history, just rewrite the history, fixing the commit that deleted the
file. "git rebase -i" is a suitable way to do it.

-- Sergey