Skip to content

Instantly share code, notes, and snippets.

@TakWolf
Created June 16, 2015 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TakWolf/3700db3c403fe2498d40 to your computer and use it in GitHub Desktop.
Save TakWolf/3700db3c403fe2498d40 to your computer and use it in GitHub Desktop.
filter-branch.shell
$ git filter-branch --tree-filter 'rm -f LICENSE' --prune-empty HEAD
// 删除git历史中的“LICENSE”文件, rm -f 表示强制删除,“--prune-empty”表示修改之后commit为空则删除这个commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment