git rewrite history - Git: How to delete committed file permanently? -


i have committed file shouldn't in git repository. have deleted , committed deletion, can still access file via git history.

how delete committed file permanently, there no trace of it?

you can remove permanently file using filter-branch. apply command in argument in every revision of repository.

git filter-branch --tree-filter 'rm -rf your_file' head 

this detailed post might you. git doc pretty helpful too.

as mentioned in comments, need git gc clean local commits , git pushto update remote repository.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -