A few commits ago, I added a large image to a git repo. A few commits later I delete the image and used git add -A
.
Is there a way to make git think as if that large file never existed?
A few commits ago, I added a large image to a git repo. A few commits later I delete the image and used git add -A
.
Is there a way to make git think as if that large file never existed?
You have to rewrite history from the commit where you added the big file. There are countless possibilities, including git filter-branch
or git rebase
or even git cherry-pick
with some manual branch manipulation.
Some related answers:
rebase
or filter-branch
. This answer is rather a wiki :-)filter-branch
solution