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? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -