{"thread":{"id":"14117","subject":"Re: why is git destructive by default? (i suggest it not be!)","startedAt":"2008-06-24T08:35:17Z","lastAt":"2008-06-24T08:35:17Z","messageCount":1,"participants":["Björn Steinbrink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80855","messageId":"20080624083517.GA14185@atjola.homenet","threadId":"14117","inReplyTo":null,"subject":"Re: why is git destructive by default? (i suggest it not be!)","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-06-24T08:35:17Z","receivedAt":"2008-06-24T08:35:17Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.06.24 08:08:13 -0000, David Jeske wrote:\n> To re-ask the same question I asked in my last post, using your ascii\n> pictures...\n> \n> \n> Let's assume we're here..\n> \n> .<---.<---.<---A<---X<---Y    <--- master\n> \\\n> \\--B<---C    <--- customer_A_branch <=== HEAD\n> \n> \n> And this person and everyone else moves their head pointers back to master\n> without merging:\n> \n> \n> .<---.<---.<---A<---X<---Y    <--- master              <=== HEAD\n> \\\n> \\--B<---C    <--- customer_A_branch\n> \n> \n> Now, five years down the road, our tree looks like:\n> \n> \n> .<---A<---X<---Y<---.<--.<--.(3 years of changes)<---ZZZ<--- master  <=== HEAD\n> \\\n> \\--B<---C   <--- customer_A_branch\n> \n> And someone does:\n> \n> git-branch -f customer_A_branch ZZZ\n> \n> To bring us to:\n> \n> .<---A<---X<---Y<---.<--.(3 years of changes)<---ZZZ<--- master  <=== HEAD\n> \\                                           \\\n> \\--B<---C                                   \\-- customer_A_branch\n> \n> \n> ..at this point, will a GC keep \"B<--C\", or garbage collect the commits and\n> throw them away?\n\nThat would throw away the changes in _that_ repository after the reflog\nentry has expired. It would not affect any other repo yet, and if that\ndeveloper tries to push that new customer_A_branch, it would be refused,\nbecause it is not a fast-forward. And if the repo he's trying to push to\nsimply doesn't allow any non-fast-forward pushes, then even push -f\nwon't help him to destroy anything.\n\nBjörn\n"}]}