---
title: "استعادة ملف محذوف في Git"
description: "استعادة ملف محذوف في Git"
canonical: https://oozou.com/til/restore-a-deleted-file-in-git-5
locale: ar
date: 2020-10-13
topic: shell
---

# استعادة ملف محذوف في Git

> استعادة ملف محذوف في Git

Published: 2020-10-13 · Topic: [shell](https://oozou.com/ar/til-topics/shell) ([markdown](https://oozou.com/ar/til-topics/shell.md))

```bash
# Find in which commit it's been deleted
$ git rev-list -n 1 HEAD -- <file_path>
4058ef780d2f6c4c6d57cfd7fd4ebe14c9dc28b3
# Restore it back
$ git checkout 4058ef780d2f6c4c6d57cfd7fd4ebe14c9dc28b3^ -- <file_path>
```

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/ar/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
