# Removing from git history

- Thread: https://externals.io/message/67563
- Original archive: https://news-web.php.net/php.internals/67563
- Started by Walter Parker on 2013-05-27T18:42:31+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #67563 — Walter Parker — 2013-05-27T18:42:31+00:00

URL: https://externals.io/message/67563#67563

>From: Pierre Schmitz <pierre@archlinux.de>
>To: internals@lists.php.net
>Cc:
>Date: Sat, 25 May 2013 05:48:07 +0200
>Subject: Re: [PHP-DEV] Re: About fileinfo test.mp3
>Am 24.05.2013 23:38, schrieb Anatol Belski:
> > […]
>
>Hi,
>
>is there a sane way to completely remove that file from the git history?
>Having a public git mirror might get me into trouble and I am probably
>not the only one.
>
>Also: WTF?
>
>Greetings,
>
>Pierre
>
>

Gitub has a nice write at https://help.github.com/articles/remove-sensitive-data

The short sort is that to remove it from the history you need to apply
'git rm' as a filter-branch to your repo. Two items of note, anyone
that has pulled will have to rebase and if you really want it removed
(no direct access even with the commit's SHA1 key), the remote can't
be updated with a push. It will have to deleted and replaced with a
repo that was updated with the filter-branch. Also note that this may
effect tagging.


Walter

--
The greatest dangers to liberty lurk in insidious encroachment by men
of zeal, well-meaning but without understanding.   -- Justice Louis D.
Brandeis
