From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.devel Subject: Re: git is screwed Date: Tue, 24 Mar 2015 17:26:01 +0100 Message-ID: <55119019.6030507@math.ntnu.no> References: <20150322154147.GA6808@Tron.local> <20150323045209.GA71859@Tron.local> <550FE343.8010607@math.ntnu.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1427214411 5427 80.91.229.3 (24 Mar 2015 16:26:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Mar 2015 16:26:51 +0000 (UTC) Cc: schwab@linux-m68k.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 24 17:26:50 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YaRf1-0005R6-7G for ged-emacs-devel@m.gmane.org; Tue, 24 Mar 2015 17:26:35 +0100 Original-Received: from localhost ([::1]:33403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaRf0-00050A-HY for ged-emacs-devel@m.gmane.org; Tue, 24 Mar 2015 12:26:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaRej-0004zt-IG for emacs-devel@gnu.org; Tue, 24 Mar 2015 12:26:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaReg-0008TH-Bb for emacs-devel@gnu.org; Tue, 24 Mar 2015 12:26:17 -0400 Original-Received: from hylle06.itea.ntnu.no ([129.241.56.235]:44149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaReg-0008OR-4O; Tue, 24 Mar 2015 12:26:14 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hylle06.itea.ntnu.no (Postfix) with ESMTP id 1FD6E66A79D; Tue, 24 Mar 2015 17:26:03 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hylle06.itea.ntnu.no Original-Received: from [IPv6:2001:700:300:1470:f944:4c2:e0a6:40fc] (unknown [IPv6:2001:700:300:1470:f944:4c2:e0a6:40fc]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hanche) by hylle06.itea.ntnu.no (Postfix) with ESMTPSA id C420366A791; Tue, 24 Mar 2015 17:26:02 +0100 (CET) User-Agent: Postbox 3.0.11 (Macintosh/20140602) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 129.241.56.235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184160 Archived-At: Richard Stallman wrote: > > It will abort the merge if it can't be done using fast-forward. > > (In other words, if the local branch has diverged from the remote= .) > > I understand that. What should I do when that occurs? In general? I would probably stash the working tree (and index) using=20 =E2=80=9Cgit stash=E2=80=9D, then try =E2=80=9Cgit pull --ff-only=E2=80=9D= again. If that succeeds, I=20 would try to reapply the stashed state on top of the new head with =E2=80= =9Cgit=20 stash pop=E2=80=9D. > Can someone tell me a full recipe for how to repair lisp/ChangeLog > (perhaps, merge it by hand) and how to get the new version into > the real repository? I think it might be useful if you posted the result of running =E2=80=9Cg= it=20 status -s=E2=80=9D so we can assess the damage. If it were me, I would make sure to copy all changed files into a safe=20 place outside the git working tree to minimise any fallout from a failed=20 recovery attempt. Then I might try a =E2=80=9Cgit reset --hard=E2=80=9D a= nd try to=20 restore the working tree to a sane state based on what I saved earlier.=20 But please note that I have never found myself in the situation you're=20 in, so it is dangerous to rely on my advice. Please do post the output=20 of git status -s before doing anything rash. =E2=80=93 Harald