git: removing files from history
That deletes the given files from all the changesets along all the repository history, as they never were commited.
It is not a very friendly command (it’s the git style!), but at least it can be done.
$ git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch <file/dir>' --prune-empty --tag-name-filter cat -- --all $ rm -rf .git/refs/original $ git reflog expire --expire=now --all $ git gc --prune=now $ git gc --aggressive --prune=now $ git push --force
Far as I know this is not possible with mercurial
References
- http://stackoverflow.com/questions/5563564/remove-files-from-git-repo-completely
- https://help.github.com/articles/remove-sensitive-data
[ show comments ]
blog comments powered by Disqus