From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Pitre Subject: Re: Rollback of git commands Date: Wed, 28 Nov 2007 11:26:45 -0500 (EST) Message-ID: References: <9e4733910711271523p3be94010jac9c79e6b95f010d@mail.gmail.com> <7vmyszb39s.fsf@gitster.siamese.dyndns.org> <9e4733910711271733r6f280618pbb14095aebba3309@mail.gmail.com> <9e4733910711272037r2ce3ed01y31ec8531f5803efe@mail.gmail.com> <9e4733910711280758x38ca3cdau4e62bfe8776e5c0d@mail.gmail.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Sean , Junio C Hamano , Git Mailing List To: Jon Smirl X-From: git-owner@vger.kernel.org Wed Nov 28 17:27:24 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IxPkm-0001eZ-PH for gcvg-git-2@gmane.org; Wed, 28 Nov 2007 17:27:13 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758856AbXK1Q0r (ORCPT ); Wed, 28 Nov 2007 11:26:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758816AbXK1Q0r (ORCPT ); Wed, 28 Nov 2007 11:26:47 -0500 Received: from relais.videotron.ca ([24.201.245.36]:54912 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754769AbXK1Q0r (ORCPT ); Wed, 28 Nov 2007 11:26:47 -0500 Received: from xanadu.home ([74.56.106.175]) by VL-MH-MR001.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0JS80077D5OMV520@VL-MH-MR001.ip.videotron.ca> for git@vger.kernel.org; Wed, 28 Nov 2007 11:26:46 -0500 (EST) X-X-Sender: nico@xanadu.home In-reply-to: <9e4733910711280758x38ca3cdau4e62bfe8776e5c0d@mail.gmail.com> User-Agent: Alpine 0.99999 (LFD 814 2007-11-14) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: On Wed, 28 Nov 2007, Jon Smirl wrote: > On 11/28/07, Nicolas Pitre wrote: > > On Tue, 27 Nov 2007, Jon Smirl wrote: > > > > > Of course you've never screwed up a repository using git commands, > > > right? I've messed up plenty. A good way to mess up a repo is to get > > > the data in .git/* out of sync with what is in the repo. I'm getting > > > good enough with git that I can fix most mess up with a few edits, but > > > it took me two years to get to that point. Rolling back to a check > > > point is way easier. User error and a command failing are both equally > > > valid ways to mess up a repo. > > > > The reflog contains all your check points, for every modifications you > > make, even the stupid ones. You should look at it. > > The state contained in the other config files in .git/* is not getting > check pointed. I can use reflog to move my branch heads around. But > doing that does not undo the changes to the state recorded in .git/*. > After the error I encountered I moved my branch head back, but the > state stgit had stored in .git/* was out of sync with where the branch > had been moved to. It's up to stgit to version control its state then. It may even use a reflog for it. All the machinery is there already. Nicolas