All posts tagged: delete history

Delete git files from public GitHub history

Leave a comment
Coding / Howtos

To delete git files uploaded accidentally to GitHub (or any other public repository) do these steps: Download as suggested by GitHub git clone –mirror GIT_REPOSITORY_URL cd path/to/cloned/repository Download BFG java -jar /path/to/download/dir/bfg-VERSION.jar –delete-files filename.ext Run the command specified by BFG (usually git reflog expire –expire=now –all && git gc –prune=now –aggressive) git push If you get an error on pull, probably you haven’t cloned the repository as step 2. Browsing the public history, any […]