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
    Sep 13 '19 at 12:19

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, privacy policy and cookie policy