Re: Individual file snapshots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <4B75BD06.1010802@xxxxxxxxxxxxxx>,
 René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> wrote:

> Am 12.02.2010 13:03, schrieb Ron Garret:
> > Before I reinvent the wheel...
> > 
> > I would like to be able to store snapshots of individual files without 
> > making a commit on the main branch.  The scenario is that I've written 
> > some experimental code that I have decided not to keep as part of the 
> > main project, but which I might want to refer back to some day.  Is 
> > there any easy way of doing that in git?
> 
> You could keep the experimental files (or changes) in a separate,
> private branch on your local repository.
> 
> René

Yeah, I considered that.  The problem with that is that the actual 
process turns out to be pretty obtrusive.  The scenario is that I've 
done a bunch of hacking on the main branch and I realize that it's going 
nowhere.  Nothing is working, everything is a horrible mess that's 
spinning wildly out of control.  I want to get rid of everything I've 
done and start over from an earlier snapshot that I knew was working.  
But I also want to keep a copy of this current messy state around for 
reference just in case there's a snippet here and there that might be 
salvageable later on.  I don't know of any easy way to save the messed 
up file onto another branch.  I'd have to save the file somewhere (in 
the stash maybe?), check out the snapshot branch, retrieve the saved 
file, do the commit, and then switch back to the main branch.

But maybe the right answer is to just write a script that does all that 
automatically?

rg

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]