Gnus development mailing list
 help / color / mirror / Atom feed
From: Steinar Bang <sb@dod.no>
To: ding@gnus.org
Subject: Re: New branch for No Gnus
Date: Tue, 31 Jan 2012 21:56:53 +0100	[thread overview]
Message-ID: <87d39zh9pm.fsf@dod.no> (raw)
In-Reply-To: <87ty3b6c0d.fsf@gnus.org>

>>>>> Lars Ingebrigtsen <larsi@gnus.org>:

> But I guess I don't really want to merge No Gnus as is into master.  I
> just want to cherry-pick any commits I make, I guess? 

Merges are always better than cherry picks: with merges the commits gets
their original identity and commit time.  You also get a clear ancestry
for the file, and the commits in the file.

> I certainly don't want to merge the commit I just did that bumped the
> version number to No Gnus 0.20, for instance.

What you can do, is always merge with
 cd ~/git/mgnus/
 git fetch
 git merge --no-ff --no-commit orgin/no-gnus

The "--no-ff" means that the merge will always create a merge commit in
the branch you're merging into.  History-wise that's a good thing.

The "--no-commit" tells git merge not to do an auto-commit, but stop,
like it always does of there is a commit.

If you then do `M-x magit-status RET' in cd ~/git/mgnus/ you will see
all files affected by the merge.  And entering the files and doing
`C-x v =' will show the diffs with the current branch.

If you don't want the changes for a particular file at all, eg. you want
to keep the current version of the lisp/silly.el file, do
 git checkout origin/master lisp/silly.el

If you do a `g' in the "magit: mgnus" buffer, you will see that
lisp/silly.el has gone away.

If you get a conflict: enter the file, look at the conflict markers and
edit the file to your satisfaction, and then stage the file.

Once you're satisfied with the merge results, just press `c' in the
"magit: mgnus" buffer, og do
 git commit
at the command line, whatever suits you best.

The best thing about this, is that if the files you don't want merged
doesn't have any changes on the no-gnus branch, you won't be bothered by
them on the next merge.  As far as git is concerned it has already been
merged with the master branch, and the current version on master (which
was the old version on master) is the result.

> So how do I cherry-pick commits?

  git cherry-pick sha1-of-commit

But like I said earlier: if you can do it with regular merges, that's
much to be preferred.

(it's chapter 3 in that book again...)




  parent reply	other threads:[~2012-01-31 20:56 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-28 18:50 Lars Ingebrigtsen
2012-01-28 19:29 ` Raphael Kubo da Costa
2012-01-30 17:02   ` Lars Ingebrigtsen
2012-01-28 19:45 ` Andreas Schwab
2012-01-28 20:42   ` Steinar Bang
2012-01-30 17:36     ` Lars Ingebrigtsen
2012-01-30 21:24       ` Steinar Bang
2012-01-30 22:05         ` Lars Ingebrigtsen
2012-01-31 16:16           ` Steinar Bang
2012-01-31 17:02             ` Lars Ingebrigtsen
2012-01-31 17:07               ` Richard Riley
2012-01-31 17:14                 ` Lars Ingebrigtsen
2012-01-31 17:50                   ` Richard Riley
2012-01-31 18:36               ` Raphael Kubo da Costa
2012-01-31 18:44                 ` Lars Ingebrigtsen
2012-01-31 18:52                   ` Raphael Kubo da Costa
2012-01-31 18:58                     ` Lars Ingebrigtsen
2012-01-31 19:15                       ` Raphael Kubo da Costa
2012-01-31 19:59                   ` Andreas Schwab
2012-01-31 20:59                   ` Steinar Bang
2012-01-31 22:49                     ` Lars Ingebrigtsen
2012-02-01  0:07                       ` Raphael Kubo da Costa
2012-02-01  0:31                         ` Lars Ingebrigtsen
2012-02-01  0:40                           ` Raphael Kubo da Costa
2012-02-01  8:46                             ` Steinar Bang
2012-02-01  0:36                         ` Andreas Schwab
2012-02-01  0:38                         ` Katsumi Yamaoka
2012-02-01  1:13                           ` Lars Ingebrigtsen
2012-02-01  1:32                             ` Katsumi Yamaoka
2012-02-01  2:22                               ` Lars Ingebrigtsen
2012-02-01  2:33                                 ` Lars Ingebrigtsen
2012-02-01  8:51                                   ` Steinar Bang
2012-02-01 13:03                                     ` Lars Ingebrigtsen
2012-02-01 14:30                                       ` Steinar Bang
2012-02-01 18:26                                         ` Ted Zlatanov
2012-02-01 18:30                                           ` Lars Ingebrigtsen
2012-02-01 18:56                                             ` Ted Zlatanov
2012-02-01 21:59                                               ` Steinar Bang
2012-02-01 22:03                                                 ` Ted Zlatanov
2012-02-01 22:24                                                   ` Lars Ingebrigtsen
2012-02-01 22:43                                               ` Andreas Schwab
2012-02-01  8:24                             ` Steinar Bang
2012-01-31 22:50                     ` Lars Ingebrigtsen
2012-01-31 22:59                       ` Lars Ingebrigtsen
2012-01-31 23:05                         ` Lars Ingebrigtsen
2012-01-31 23:26                           ` Lars Ingebrigtsen
2012-01-31 23:32                             ` Lars Ingebrigtsen
2012-01-31 23:37                               ` Lars Ingebrigtsen
2012-01-31 23:58                                 ` Lars Ingebrigtsen
2012-02-01  0:46                                   ` Andreas Schwab
2012-02-01  1:14                                     ` Lars Ingebrigtsen
2012-02-01  1:16                                       ` Lars Ingebrigtsen
2012-02-01  9:10                                         ` Steinar Bang
2012-02-01 13:19                                           ` Lars Ingebrigtsen
2012-02-01 11:31                                         ` Andreas Schwab
2012-02-01 13:03                                           ` Lars Ingebrigtsen
2012-01-31 20:56               ` Steinar Bang [this message]
2012-02-01 16:22                 ` Eric S Fraga
2012-02-01  1:47               ` Michael Welsh Duggan
2012-01-30 17:34   ` Lars Ingebrigtsen

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=87d39zh9pm.fsf@dod.no \
    --to=sb@dod.no \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).