---
title: "Discussion on \"Mastering Git: Safely Rewriting History to Remove Sensitive Files\" | Hashnode"
description: "Discussion on \"Mastering Git: Safely Rewriting History to Remove Sensitive Files\". Undoing the Past with git-filter-repo"
url: "https://hashnode.com/posts/mastering-git-safely-rewriting-history-to-remove-sensitive-files/674b3af382962aa84b91ff47"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Mastering Git: Safely Rewriting History to Remove Sensitive Files](https://agathabahati.hashnode.dev/mastering-git-safely-rewriting-history-to-remove-sensitive-files?utm_source=hashnode&utm_medium=feed)

Undoing the Past with git-filter-repo

Oct 13, 2024 · 6 min read · agathabahati.hashnode.dev  
Updated Dec 3, 2024  
Read the article

-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Agatha Bahati](https://hashnode.com/@AgathaBahati)

@AgathaBahati · Nairobi, Kenya

  
[View profile](https://hashnode.com/@AgathaBahati)

Aspiring Code Psychologist

Agatha is a backend engineer fluent in Python (FastAPI, Django, Flask) and JavaScript (Node.js), with Docker always at hand. She writes to learn and to teach others, breaking down complex tech into simple, actionable insights—always aiming for clarity as sharp as her APIs. Her coding philosophy? Be like an empty cup: open to new ideas, ready to learn, and always willing to approach problems from a fresh angle. After all, the usefulness of a cup is in its emptiness. When she's not crafting backend magic, you’ll find her hiking, painting, or farming—because even coders need to debug in nature sometimes.

## Responses 1

Markdown supported · ⌘↵ to post

[Kibet](https://hashnode.com/@Antonykibet)

[Jun 21, 2025](https://hashnode.com/posts/mastering-git-safely-rewriting-history-to-remove-sensitive-files/674b3af382962aa84b91ff47/comment/68564dd811ec3c02ad07f38d)

Insightful 💯
