We are migrating from Azure DevOps Git to GitHub. The repo is huge, old, unfortunately has binaries and with tons of branches and tags. We decided on a cut-off date and want to drop all history before that date (which will also remove the binaries and large files as they were later deleted) We want to retain only specific branches from the selected date and hopefully keep the tags.
Got completely lost with filter-branch and haven't been able to find a good and fast way of doing this. This simplest thing I found was doing an orphan checkout from what we want as the new root commit, rebasing and then prune and run garbage collector. But, the new root commit is dated to now, all commit IDs change, we lose all the tags and I couldn't do it for all branches I want to retain.
What is the best way of achieving this?