From: Harald Hanche-Olsen <hanche@math.ntnu.no>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: git is screwed
Date: Wed, 01 Apr 2015 22:41:06 +0200 [thread overview]
Message-ID: <551C57E2.7030302@math.ntnu.no> (raw)
In-Reply-To: <E1YZgge-0008FR-Qh@fencepost.gnu.org>
Maybe it is time to revisit this one, in light of what we have learned
since.
Richard Stallman wrote:
> I committed some changes using C-x v v in vc-dir.
> Something went wrong with lisp/ChangeLog.
>
> It appears that my change log entries went into an old version of that
> file; I don't know why this happened, since I wrote them today after
> doing 'git pull'.
(“today” in this email is March 22)
Ah, but we have the output of git reflog now:
dca743f HEAD@{0}: commit: Recognize more format variation. Automatically
reshow decrypted text.
1a80be1 HEAD@{1}: commit: Echo area shows when displaying a mime message.
414e79f HEAD@{2}: commit: Prefer IceCat to Firefox and Iceweasel.
f1cea3e HEAD@{3}: checkout: moving from TEST to master
f1cea3e HEAD@{4}: checkout: moving from master to TEST
f1cea3e HEAD@{5}: pull: Fast-forward
3517da7 Head@{6}: clone: from rms@git.sv.gnu.org:/srv/git/emacs.git
and there are no traces here of a successful pull after those three
commits, which by the wat were all done in quick succession on March 22.
The commit they are based on is f1cea3e, which is indeed about 8 weeks
old. So it appears that your git pull failed, and you did edit an old
lisp/ChangeLog.
> After this, I did 'git pull' again, and it said there was a merge
> conflict in lisp/ChangeLpg. A lot of text appears to be missing from
> the file. It said, "fix conflicts and then commit the result."
>
> I edited lisp/ChangeLog and tried to commit it with C-x v v.
> That gave me the error message
>
> fatal: cannot do a partial commit during a merge.
>
> I am now stuck. […]
>
> How can I get this unwedged?
We have also learned that “git ls-files -u” produces no output. That
simplifies the available options somewhat, I think, since there are no
unmerged files to deal with (they complicate the index quite a lot,
since there may be several versions of these files there).
The only file different in the index and your working tree is
lisp/ChangeLog. If you run “git diff”, you should see the difference
between those two (in that order), and nothing else. If based on the
output, you think the version in your working tree is more appropriate
than the one in the index, you should go ahead and run “git add
lisp/ChangeLog”. Otherwise, edit it further until satisfied, then run
“git add lisp/ChangeLog”, at which point your working tree and index are
in agreement (and “git diff” should produce no output).
The next thing you could try, is to run this command:
git diff origin/master
This shows the difference between what is now in the working tree and
what got fetched on your last I expect you will see all the changes you
have made in your recent work, and nothing else. If so, go ahead and run
“git commit“, but don't try to push yet. Your repository should now be
in a sane state.
The only problem is that your latest additions – the ones you tried to
commit with the initial C-x v v – will now be mixed in with the merge
commit, which obscures the history. We might want to look into fixing
that next.
– Harald
next prev parent reply other threads:[~2015-04-01 20:41 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-22 14:17 git is screwed Richard Stallman
2015-03-22 14:53 ` Andreas Schwab
2015-03-23 3:25 ` Richard Stallman
[not found] ` <20150322154147.GA6808@Tron.local>
[not found] ` <E1YZszx-0004Ff-JK@fencepost.gnu.org>
2015-03-23 4:52 ` Sam Gwydir
2015-03-23 9:56 ` Harald Hanche-Olsen
2015-03-24 15:54 ` Richard Stallman
2015-03-24 16:26 ` Harald Hanche-Olsen
2015-03-26 10:54 ` Richard Stallman
2015-03-26 11:11 ` Harald Hanche-Olsen
2015-03-26 11:27 ` Harald Hanche-Olsen
2015-03-26 12:21 ` Steinar Bang
2015-03-26 14:16 ` Stefan Monnier
2015-03-26 17:04 ` Eli Zaretskii
2015-03-26 19:02 ` Steinar Bang
2015-03-26 20:29 ` Eli Zaretskii
2015-03-26 22:34 ` Stefan Monnier
2015-03-27 7:24 ` Eli Zaretskii
2015-03-27 13:09 ` Stefan Monnier
2015-03-27 19:35 ` Steinar Bang
2015-03-27 19:59 ` Eli Zaretskii
2015-03-27 20:36 ` Steinar Bang
2015-03-27 19:30 ` Steinar Bang
2015-03-26 10:54 ` Richard Stallman
2015-03-26 15:10 ` John Wiegley
2015-03-26 10:54 ` Richard Stallman
2015-03-25 8:29 ` Steinar Bang
2015-03-25 10:29 ` Artur Malabarba
2015-03-25 12:41 ` Stefan Monnier
2015-03-25 13:42 ` Steinar Bang
2015-03-25 14:32 ` Artur Malabarba
2015-03-25 23:23 ` Jonas Bernoulli
2015-03-26 0:35 ` Stefan Monnier
2015-03-26 1:42 ` John Yates
2015-03-26 2:04 ` Stefan Monnier
2015-03-26 8:00 ` Steinar Bang
2015-03-26 8:28 ` Alexis
2015-03-26 8:41 ` Alexis
2015-03-26 8:58 ` Artur Malabarba
2015-03-26 10:27 ` Rasmus
2015-03-26 19:01 ` Ricardo Wurmus
2015-03-26 19:08 ` Rasmus
2015-03-26 23:41 ` Jonas Bernoulli
2015-04-01 20:41 ` Harald Hanche-Olsen [this message]
2015-04-03 11:00 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=551C57E2.7030302@math.ntnu.no \
--to=hanche@math.ntnu.no \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.