{"thread":{"id":"14151","subject":"Re: why is git destructive by default? (i suggest it not be!)","startedAt":"2008-06-25T18:06:08Z","lastAt":"2008-06-25T18:06:08Z","messageCount":1,"participants":["Dmitry Potapov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"81153","messageId":"20080625180608.GC5737@dpotapov.dyndns.org","threadId":"14151","inReplyTo":null,"subject":"Re: why is git destructive by default? (i suggest it not be!)","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-06-25T18:06:08Z","receivedAt":"2008-06-25T18:06:08Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Tue, Jun 24, 2008 at 10:13:13PM -0000, David Jeske wrote:\n> \n> Two things I'd like to make it easy for users to never do are:\n> - delete data\n> - cause refs to be dangling\n\nWhy? Let's suppose you work with CVS and you started to edit some\nfile and then realize than the change that you make is stupid, would\nnot you want just to discard these change without committing them to\nCVS?\n\nPerhaps, you are confused by thinking that git commit and cvs commit\nare conceptually same commands. IMHO, far better to analogue to cvs\ncommit would be git push to a repository with denyNonFastForwards\npolicy. Git commit allows you to save your changes locally as series\nof patches, but until you have not pushed them, they are not in a\npermanent storage. You can change these patches, which implies that\nold versions may become dangling and will be removed after reflog\nexpired. The idea of making of making difficult to remove some local\ncommits is alike the idea of an editor making difficult to remove a\nline... You gain nothing from that. What editors do instead is to\nprovide the Undo action. Similarly, Git allows you to get back to an\nold state using the reflog.\n\nDmitry\n"}]}