From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Santi_B=E9jar?= Subject: Re: Set the repository as it was on an earlier commit Date: Sat, 26 Dec 2009 00:36:24 +0100 Message-ID: References: <8c6f7f450912251509i67da4665t78be0bb79f2c40d6@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: git@vger.kernel.org To: Sergio Belkin X-From: git-owner@vger.kernel.org Sat Dec 26 00:36:52 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.50) id 1NOJiE-0007mB-VY for gcvg-git-2@lo.gmane.org; Sat, 26 Dec 2009 00:36:51 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756425AbZLYXg2 convert rfc822-to-quoted-printable (ORCPT ); Fri, 25 Dec 2009 18:36:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756255AbZLYXg2 (ORCPT ); Fri, 25 Dec 2009 18:36:28 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:57474 "EHLO mail-fx0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753203AbZLYXg2 convert rfc822-to-8bit (ORCPT ); Fri, 25 Dec 2009 18:36:28 -0500 Received: by fxm25 with SMTP id 25so3490118fxm.21 for ; Fri, 25 Dec 2009 15:36:24 -0800 (PST) Received: by 10.102.207.10 with SMTP id e10mr3462547mug.18.1261784184355; Fri, 25 Dec 2009 15:36:24 -0800 (PST) In-Reply-To: <8c6f7f450912251509i67da4665t78be0bb79f2c40d6@mail.gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Sat, Dec 26, 2009 at 12:09 AM, Sergio Belkin wrot= e: > Hi, > > Firstly merry Christmas everyone. > > I am somewhat new to git, and I've found great, but still I have some > doubts about it, let's say I have the following repo with: > > A---B---C---D > > Being A the first commit, =A0B the second one an D the last one. > > How I do to go back to let's say... B commit status, I mean somewhat = as follows: > > A---B---C---D---B' > > B' would be the same as B. I am not asking to do something so: > > A---B---C---D to A---B losing C and D commits, > > I'd like to keep on history C and D commits, can git to do that? I don't know if it is possible with porcelain commands, but with plumbing you can: # begin with a clean working dir git read-tree B git commit git reset --hard HTH, Santi