Reference
Remove sensitive files from Git/Github
In Terminal
git filter-branch --index-filter 'git rm --cached --ignore-unmatch [file path/name]' --prune-empty --tag-name-filter cat -- --all
Example:
| // example taken from redux middleware docs : http://gaearon.github.io/redux/docs/advanced/Middleware.html | |
| // ES5 | |
| function logger (store) { | |
| return function (next) { | |
| return function (action) { | |
| console.log('dispatching', action); | |
| var result = next(action); | |
| console.log('next state', store.getState()); | |
| return result; |
Reference
Remove sensitive files from Git/Github
In Terminal
git filter-branch --index-filter 'git rm --cached --ignore-unmatch [file path/name]' --prune-empty --tag-name-filter cat -- --all
Example: