When I try to remove an unwanted GitHub file, the file doesn't disappear. I am following the instructions at https://help.github.com/articles/remove-sensitive-data/. Is the filename in the format /GitHub/repositoryname/?

  • What does Dropbox have to deal with GitHub?
    – 76840
    Commented Sep 13, 2019 at 12:19

1 Answer 1


Following the instructions in the URL, I CDed to the repository folder. I typed filename in the following command instead of the full path and it worked:

git filter-branch --force --index-filter "git rm --cached --ignore-unmatch filename" --prune-empty --tag-name-filter cat -- --all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.