I know various permutations of this questions are floating around, but I haven't been able to uncover anything that addresses my specific issue. The thing is this:
I've got a repo hosted on GitHub. It's the origin for two remote repos - one is my dev machine and the other is the server. I made a stupid mistake and had a script commit incremental user DB backups over the course of like a year and a half. So now I've got about 200mb of files and another 1Gb of incremental db changes committed in my git repo (yes, I learned my lesson). Visually, it looks like this, where "C" indicates a legitimate code change and "DB" means it's a commit containing only an unimportant DB backup:
C1--C2--C3--C4--DB--DB--DB--DB--DB--DB--DB--DB...(1.5 years)...DB--DB...
What I want to do is this:
/--DB--DB--DB--DB--DB...<--(throw all this away forever)
/
C1--C2--C3--C4--//<--REVERT TO THIS POINT --C5--C6--C7....
I'd basically create a branch containing all of those stupid DB commits, back my repo up to the point where the branch departs, then delete the branch. Any ideas about how to do this? Ideally, I wouldn't have to create a new GitHub repo, but I'll accept suggestions of any nature.