POV-Ray : Newsgroups : povray.off-topic : Git tutorial : Re: Git tutorial Server Time
30 Jul 2024 04:18:20 EDT (-0400)
  Re: Git tutorial  
From: Darren New
Date: 20 Apr 2011 12:24:02
Message: <4daf08a2@news.povray.org>
On 4/20/2011 8:49, Invisible wrote:
> The problem Git seems to have is that it uses heads to keep track of things.
> Delete the head and the corresponding commit drops off the face of the Earth.

Yes. That's why you shouldn't do that.

First, deleting a head that you can't reach from anywhere else requires you 
to answer a confirmation, just like anything else. Second, the *files* are 
still there. You just might not know what they're called. They're probably 
still around at least a couple of weeks before git cleans them up. I.e., 
there are well-documented ways to recover from this if you do it accidentally.

On the other hand, if you work on something and decide it wasn't a good 
idea, you can delete the branch and no harm no done. Darcs apparently 
requires you to copy the entire repository before you even *start* making 
changes if you want to recover.

> Darcs manages a set [as in set theory] of changes. You don't need to keep
> updating a "pointer" to point to the latest one or anything. I'd be
> surprised if no over VCS has thought of this.

But that's exactly why you need to start a new repository if you want a new 
branch. If you clone a repository in Darcs, make a bunch of changes, then 
accidentally delete the repository, you're in even worse shape than if you 
delete a branch in git.

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.