From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Sun, 05 Apr 2015 15:55:07 +0300 Message-ID: <83twwun39w.fsf@gnu.org> References: <5511998E.8080309@cs.ucla.edu> <5512F8C7.7010509@math.ntnu.no> <5513F889.4000404@math.ntnu.no> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1428238559 1917 80.91.229.3 (5 Apr 2015 12:55:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Apr 2015 12:55:59 +0000 (UTC) Cc: eggert@cs.ucla.edu, hanche@math.ntnu.no, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 05 14:55:43 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 1Yek5W-0002Eu-QH for ged-emacs-devel@m.gmane.org; Sun, 05 Apr 2015 14:55:42 +0200 Original-Received: from localhost ([::1]:36302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yek5W-00051d-7I for ged-emacs-devel@m.gmane.org; Sun, 05 Apr 2015 08:55:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yek51-00051I-9o for emacs-devel@gnu.org; Sun, 05 Apr 2015 08:55:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yek4w-000384-H0 for emacs-devel@gnu.org; Sun, 05 Apr 2015 08:55:11 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:53090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yek4w-00033b-4t; Sun, 05 Apr 2015 08:55:06 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NMC001003K3Z900@mtaout29.012.net.il>; Sun, 05 Apr 2015 15:52:38 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMC00IH43RQVH80@mtaout29.012.net.il>; Sun, 05 Apr 2015 15:52:38 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 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:184919 Archived-At: > Date: Sun, 05 Apr 2015 05:11:07 -0400 > From: Richard Stallman > Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org > > Having stashed my changes, I tried 'git pull'. It said that the merge failed > and reported conflicts in lisp/ChangeLog. > > I fixed those by hand, and tried various ways to proceed from there. > I tried to commit lisp/ChangeLog with C-x v v in that file > and got an error that partial commits are not allowed in the middle of a > merge. "C-x v v" does the wrong thing in this situation: it attempts to commit that single file, lisp/ChangeLog in your case. Git will not allow you to do that when you are in the middle of a merge. That merge is the second part of what "git pull" does (the first part is fetching the last changes from upstream). Normally, if the merge succeeds, Git automatically commits the result, but in this case it failed, and the merge was suspended. Since you are in the middle of a merge, you need to commit _everything_ that awaits to be committed, after resolving the conflicts. This includes the stuff Git successfully merged, and the single file where it failed and left it to you to resolve the conflicts. To commit everything, you need to issue "git commit" without any file-name arguments from the shell prompt, or 'v' from the vc-dir buffer. > You had recommended > > git add lisp/ChangeLog > git commit > > so I tried that. git add completed with no output. > git commit showed me a monster list of files with > changes to be committed, and asked me for the log message. > I killed it. You should have let it proceed: that long list of files are the changes from upstream that Git succeeded in merging, and which await to be committed. I would use "Fix pull conflicts" as the log message. You can still do that, since you are now exactly in the same situation you were before the "git commit" command. Just type it again. > I know one way to get out of this. I can extract my changes by hand, > from the files ChangeLog says I had changed. Then I can delete this > repository and make another to use to install these changes. Yes, that's one way. It is not the best one, though. > I could make another repository each time I need to install something. > But cvs was much more convenient. I wrote up simple procedures, very similar to what you did with CVS, on the Wiki. While writing, I tried to follow a CVS procedure as close as possible; I wonder whether that succeeded. Please read http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs and see if what's there now keeps you out of trouble.