Skip to content

Instantly share code, notes, and snippets.

@NewFuture
Created March 11, 2017 03:33
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 NewFuture/bccff8ecc452ec90d9e1491352c7c0d2 to your computer and use it in GitHub Desktop.
Save NewFuture/bccff8ecc452ec90d9e1491352c7c0d2 to your computer and use it in GitHub Desktop.
#删除文件和历史记录
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch {path-of-remove-file}' --prune-empty --tag-name-filter cat -- --all
#删除远程分支
git push origin --delete {branchname}
git push origin --delete tag {tag name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment