From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.devel Subject: Re: git is screwed Date: Wed, 25 Mar 2015 09:29:42 +0100 Organization: Probably a good idea Message-ID: 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 X-Trace: ger.gmane.org 1427272245 23374 80.91.229.3 (25 Mar 2015 08:30:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Mar 2015 08:30:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 25 09:30:38 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 1Yaghl-00082c-Bd for ged-emacs-devel@m.gmane.org; Wed, 25 Mar 2015 09:30:25 +0100 Original-Received: from localhost ([::1]:36793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yaghk-0008LG-Ct for ged-emacs-devel@m.gmane.org; Wed, 25 Mar 2015 04:30:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaghT-0008Hj-QC for emacs-devel@gnu.org; Wed, 25 Mar 2015 04:30:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaghN-0002yp-L4 for emacs-devel@gnu.org; Wed, 25 Mar 2015 04:30:07 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:50094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaghN-0002xl-EL for emacs-devel@gnu.org; Wed, 25 Mar 2015 04:30:01 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YaghG-0007jW-MI for emacs-devel@gnu.org; Wed, 25 Mar 2015 09:29:54 +0100 Original-Received: from rainey.bang.priv.no ([212.110.185.190]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Mar 2015 09:29:54 +0100 Original-Received: from sb by rainey.bang.priv.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Mar 2015 09:29:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: rainey.bang.priv.no Mail-Copies-To: never User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (windows-nt) Cancel-Lock: sha1:hEO2O1Pyp5GXHPFuvzJpaDIbI4A= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:184199 Archived-At: >>>>> Richard Stallman : > 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 use magit (not (yet) on GNU Elpa, but available on marmalade (version 1.2.2) and Melpa (commit-triggered builds from magit git repo)), and what I do, is: 1. 'M-x magit-status RET' 2. This opens a buffer that looks like svn-status and pcl-cvs and it shows the results of the merge - The buffer will have three (maybe four) groups: - Untracked files - Unstaged changes - Staged changes - Unpushed commits (if you're working directly on a tracking branch) - Successfully merged files are shown under "Staged changes", and you can disregard them for now - Conflicted files are shown under "Unstaged changes" with a "C" in front of them 3. I do 'g' in magit to ensure that any of the affected files I have in the buffers are reloaded from disk (this seems to happen automatically on emacs 24.4, but I still do the 'g') 4. Then I enter the conflicted files and look for the conflict markers and see if I can make sense of them. I usually force the file into fundamental-mode for this. I try to manually fix the files and when I'm satisfied I move back to the magit buffer and position the cursor over the files and press 's" which moves the files from "Unstaged changes" to "Staged changes". 5. As far as git is concerned the files are now reviewed and the merge can be completed, but I usually enter the file again and do "C-x v =" to view the diff and see if the diffs looks like I expected. I usually view the diffs of _all_ of the staged files before committing to see if they look sensible. I also usually do a clean build, run unit tests and some smoke testing before committing 6. In the magit buffer press 'c c' to commit the staged files. The commit message comes up with git's default commit message. I usually add some comments about what I did with the conflicted files The merge is now complete and resides in the newest commit locally. To push the changes upsteam from magit, do 'P P' (only available if you're on a tracking branch).