version control - Is there a way to remove "pointless" commits from git history? -


suppose have git history this:

a-b-c-d-e-f-g 

b added 60k files.

f removed same files.

any operation traverses git history, such git log, takes stupid amount of time if has cross f (or b).

is there way remove b , f history, given cancel each other out?

more point: there easy way this, , ensure other developers using repo date? (bear in mind said developers have feature branches sitting on machines.) suspect solutions going end resulting in a-c'-d'-e'-g'...

my gut says best i'm going create branch a, cherry-pick c through e, create new branch g, , merge onto first branch. or something.

just git rebase -i a , remove lines b , f.
said (or meant), rewrite published history, fellow developers need rebase branches based off manipulated branch described in man page of git rebase under section "how recover upstream rebase".


Comments