git: Split history of some files into a separate branch
问题 Say I introduced <feature.c> a while ago and now notice it shouldn't have been part of my main branch but rather a branch feature . Is it possible to use e.g. git-filter-branch to automatically move all of <feature.c>'s history out of my main branch into the feature branch? 回答1: It sounds like you're doing something fairly insane! :) That said, I see a few options, none of which are particularly automated. If you've got a ton of commits with that file present, just admit the mistake, make a