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



blog comments powered by Disqus