unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Steinar Bang <sb@dod.no>
To: emacs-devel@gnu.org
Subject: Re: git is screwed
Date: Wed, 25 Mar 2015 09:29:42 +0100	[thread overview]
Message-ID: <upzciodppjih.fsf@dod.no> (raw)
In-Reply-To: E1YaRAK-0000nD-7Q@fencepost.gnu.org

>>>>> Richard Stallman <rms@gnu.org>:

> 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).




  parent reply	other threads:[~2015-03-25  8:29 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=upzciodppjih.fsf@dod.no \
    --to=sb@dod.no \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).