Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

delete a file from repo history

$ git filter-branch --force --index-filter 
  "git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" 
  --prune-empty --tag-name-filter cat -- --all
  > Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (266/266)
  > Ref 'refs/heads/main' was rewritten
Source by docs.github.com #
 
PREVIOUS NEXT
Tagged: #delete #file #repo #history
ADD COMMENT
Topic
Name
5+1 =