emacs-devel
[Top][All Lists]
Advanced

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

Re: git is screwed


From: Harald Hanche-Olsen
Subject: Re: git is screwed
Date: Tue, 24 Mar 2015 17:26:01 +0100
User-agent: Postbox 3.0.11 (Macintosh/20140602)

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 “git stash”, then try “git pull --ff-only” again. If that succeeds, I would try to reapply the stashed state on top of the new head with “git stash pop”.

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 “git status -s” so we can assess the damage.

If it were me, I would make sure to copy all changed files into a safe place outside the git working tree to minimise any fallout from a failed recovery attempt. Then I might try a “git reset --hard” and try to restore the working tree to a sane state based on what I saved earlier. But please note that I have never found myself in the situation you're in, so it is dangerous to rely on my advice. Please do post the output of git status -s before doing anything rash.

– Harald



reply via email to

[Prev in Thread] Current Thread [Next in Thread]