delete git history without deleteing file code example
Example: how to remove git history for a file
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD