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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -