Forever Records
Remember that Git saves all commits forever (don’t worry, there is a reason why this is done in quotation marks!).
, , , , , , : ", , , "... , " ". , "" . , "".
, ( ) ,
/ Git? , , , , GitHub ", ". , : - .
, , , git rebase -i - . , , git rebase -i:
pick a123456 add feature foo
pick b123456 rm giant file accidentally added in a123456
pick ...
( " " ) ( " " ) . , Git: " , , , , ". , , , , , remove-giant-file .
, "squash" "fixup" - , Git . pick squash fixup. , commit:
, . . rebase ( "BFG", , ) , , ( ), . , , , Git :
A
, commit C , D, , E. , C -through- E ( E, ) , :
C
/
A
C-D-E C' ( C, D, ) E' ( E > ) master , E' E. , , , .
, . , , - C-D-E , , , . , C-D-E ! ( .)
C-D-E, , ( ). , ( ) C'-E'.
, , , :
pick a123456 add feature foo
pick b123456 rm giant file accidentally added in a123456
pick ...
, , "rm giant file" , , - . , " rm" , , rebase -i. : /; / , .
... , filter-branch BFG, () : . ( git commit --amend , , ).