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?
Asked
Active
Viewed 74 times
0

Cystack
- 3,301
- 5
- 35
- 33
1 Answers
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
-
yep I had to --force it. was shaking a bit, but that's what I needed ;) – Cystack Dec 07 '13 at 15:31