I have a bitbucket project which, in it's early stages, included a binary access database.
Most of the changes to that file that were checked in were data changes; I want to discard the data changes while keeping the DDL changes and the file itself.
I've gotten as far as finding a list of all the commits that touch that file, with
$ git log --pretty=oneline --branches -- TradeDangerous.accdb
But I'm having a hard time wrapping my head around the git chicanery here.
Ideally I want to remove changes to the file from commits in a given range as well as, possibly, remove commits that are only to that file within the range. If you then checkout a commit somewhere within the range you'd get the file as it was at the start of the range.
The coup-de-grace is that I want to be able to push these changes to bitbucket.
The revision range I'm trying to work on right now is 7b9ba..c752fd
When I try
$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch TradeDangerous.accdb' -- 7b9ba..c752fd
git responds with
Which ref do you want to rewrite?
At which point I'm stuck.