git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Don Zickus <dzickus@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: branching and supporting a tagged kernel version
Date: Mon, 12 Dec 2005 14:37:22 -0800	[thread overview]
Message-ID: <7virtueycd.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <68948ca0512121331x13bfb691t62224d02ced04a27@mail.gmail.com> (Don Zickus's message of "Mon, 12 Dec 2005 16:31:08 -0500")

Don Zickus <dzickus@gmail.com> writes:

> So my questions (for now) are:
>
> 1) what is the easiest way to branch off on a tagged version (in this
> case 2.6.14)?  I didn't quite understand what <starting point>
> referred to in the git-branch docs.

Starting point is badly worded, but essentially it means
"anything that names a particular commit".  That's the commit
you want to base your branch off of.

In your case, you would run:

------------
$ git clone git://git.kernel.org/pub/.../torvalds/linux-2.6/ my2.6
$ cd my2.6
$ git checkout -b private v2.6.14
------------

to create and checkout a branch called "private" to house your
personal changes, based on v2.6.14.  Your working tree is based
on v2.6.14 and you are on the "private" branch immediately after
this operation, and you should see no diff from either of these
commands:

------------
$ git diff v2.6.14 <1>
$ git diff private v2.6.14 <2>

<1> compare your work tree with v2.6.14 tagged by Linus
<2> compare "private" branch head with v2.6.14 tagged by Linus
------------

Then work as usual, the cycle is:

------------
$ edit
$ git diff ;# to see how well you are doing
$ compile
$ test
$ git diff HEAD ;# final review before committing
$ git commit -a ;# commit all changes as you tested
------------

> 2) is there a way to get a list of commits from upstream that are not
> in my branch and then selectively apply them?  Yes, I understand the
> potential merge mess...

I'll refrain from saying that it is not the usual way to work
with git, since you seem to know what you are doing.  So let's
assume that you somehow do not ever want to merge from Linus
head into the "private" branch.

After you have worked there:

------------
$ git fetch origin
$ git cherry origin private
------------

would show the list of commits since you forked from origin, 
which is Linus head --- when you run "git clone" to set up
"my2.6" repository, it would have made .git/remotes/origin
shorthand that has this line in it:

------------
URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
Pull: master:origin
------------

pick the ones you want, and apply them with:

------------
$ git cherry-pick 12233445....
------------

  reply	other threads:[~2005-12-12 22:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-12 21:31 branching and supporting a tagged kernel version Don Zickus
2005-12-12 22:37 ` Junio C Hamano [this message]
2005-12-12 23:58   ` Don Zickus
2005-12-13  0:01     ` Petr Baudis

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=7virtueycd.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=dzickus@gmail.com \
    --cc=git@vger.kernel.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).