Deleting a file permanently from a git branch Posted by Petar Vasilev on November 13, 2016 in Coding git filter-branch --tree-filter 'rm -rf /path/to/file/or/folder' HEAD Coding