From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/81062 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: Re: New branch for No Gnus Date: Tue, 31 Jan 2012 21:56:53 +0100 Organization: Probably a good idea Message-ID: <87d39zh9pm.fsf@dod.no> References: <87bopnvezm.fsf@gnus.org> <87k44bh84h.fsf@dod.no> <87aa55cctr.fsf@gnus.org> <87aa54riih.fsf@dod.no> <87bopkc0dq.fsf@gnus.org> <87hazb26fm.fsf@dod.no> <87ty3b6c0d.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328043470 8693 80.91.229.3 (31 Jan 2012 20:57:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2012 20:57:50 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M29343@lists.math.uh.edu Tue Jan 31 21:57:46 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RsKlp-0007lY-LZ for ding-account@gmane.org; Tue, 31 Jan 2012 21:57:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RsKlO-0006JR-AS; Tue, 31 Jan 2012 14:57:14 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RsKlM-0006JG-Fv for ding@lists.math.uh.edu; Tue, 31 Jan 2012 14:57:12 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RsKlF-0008Pg-Hz for ding@lists.math.uh.edu; Tue, 31 Jan 2012 14:57:09 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RsKlC-0006kM-Nb for ding@gnus.org; Tue, 31 Jan 2012 21:57:02 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RsKlB-0007O2-UL for ding@gnus.org; Tue, 31 Jan 2012 21:57:01 +0100 Original-Received: from cm-84.208.231.161.getinternet.no ([84.208.231.161]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Jan 2012 21:57:01 +0100 Original-Received: from sb by cm-84.208.231.161.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Jan 2012 21:57:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 56 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.208.231.161.getinternet.no Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:V4WJ5WmaqMLrDepuc4+xh3iO0ek= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:81062 Archived-At: >>>>> Lars Ingebrigtsen : > 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...)