---
title: "Memulihkan File yang Terhapus di Git"
description: "Memulihkan file yang terhapus di Git"
canonical: https://oozou.com/til/restore-a-deleted-file-in-git-5
locale: id
date: 2020-10-13
topic: shell
---

# Memulihkan File yang Terhapus di Git

> Memulihkan file yang terhapus di Git

Published: 2020-10-13 · Topic: [shell](https://oozou.com/id/til-topics/shell) ([markdown](https://oozou.com/id/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/id/contact

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