remove file i accidentally committed code example
Example: git remove file from commit
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