0

I have a file I want to erase from my repo history. I've run the command on local repo: git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch faultyfiles.json' \ --prune-empty --tag-name-filter cat -- --all
But when I want to push that to github, I'm asked for a pull first. And when I pull, you guessed it, the faulty files come back from origin. How do I get out of that?

Cystack
  • 3,301
  • 5
  • 35
  • 33

1 Answers1

0

Try git push -f to force it, without pulling. Note that this command is somewhat dangerous, and should not be used without thought.

John Zwinck
  • 239,568
  • 38
  • 324
  • 436