Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save licsber/df8dcceb39c84307f330227b92e627c5 to your computer and use it in GitHub Desktop.

Select an option

Save licsber/df8dcceb39c84307f330227b92e627c5 to your computer and use it in GitHub Desktop.
删除git历史中误提交的文件或者大文件
git filter-branch -f --prune-empty --index-filter "git rm -rf --cached --ignore-unmatch filename" --tag-name-filter cat -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment