Delete all the history of a file git
The purpose is to git version control, recording every version change. But sometimes we tend to want to completely delete a file from the repository, no longer appear in history. For example accidentally uploaded a bunch of wrong file, or accidentally uploaded the account number, password, how to do it this time? The following command can be the perfect solution to your problem
$ git filter-branch -f --tree-filter 'rm -rf common/service/SyncBlogServince.php' HEAD
$ git push origin --force
Batch delete git branch
git branch -r |grep 'origin/pmt_201608' | awk -F '/' '{print $2}' | xargs -I {} git push origin :{
Original Address: [git] to delete all the history of a file, batch delete remote branches
Tags: git GitHub batch delete branch
Intelligent Recommendation
- [Notes] using the first portion Git: git installation and use git
- [Notes] using the second portion Git: single limb development and basic commands
- [Notes] using Git Part III: multi-branch development
- virtualbox + ubuntu virtual machine directory share
- jquery event bind many times, many times the trigger, how clear history bind events
Reproduced in: https: //my.oschina.net/54php/blog/600311