git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: GIT and the current -stable

From
Greg KH <greg@kroah.com>
Date
Apr 14, 2007, 07:21 UTC
Message-ID
<20070414072106.GA6344@kroah.com>
In-Reply-To
<7vfy73bhik.fsf@assigned-by-dhcp.cox.net>
On Fri, Apr 13, 2007 at 11:24:19PM -0700, Junio C Hamano wrote:
Show 32 quoted lines
> Rene Herman <rene.herman@gmail.com> writes:
> 
> > Stumbling around with git here. I'd like to use git to efficiently
> > track the current -stable as well as -current. Say, my local tree is a
> > clone of Linus current:
> >
> > git clone \
> > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> > local
> >
> > I then branch off a 2.6.20 branch:
> >
> > cd local
> > git checkout -b v2.6.20 v2.6.20
> >
> > to now update to the current -stable I could do:
> >
> > git pull \
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git
> 
> I think adding these lines to .git/config would do the trick,
> after you have done the "checkout -b v2.6.20 v2.6.20" step:
> 
> [branch "v2.6.20"]
> 	remote = stable
> 	merge = refs/heads/master
> [remote "stable"]
> 	url = git://git.kernel.org/.../stable/linux-2.6.20.y.git
> 	fetch = refs/heads/master
> 
> provided if stable team forks v2.6.20.y history off of Linus's
> v2.6.20.

Yes, we do branch off Linus's tree for each of the different .y releases.

Some people have asked us to keep all of the different .y branches in the same git tree, but for now we have been using different repositories on kernel.org to keep things simpler for the majority of people who do not fully understand how to use the branching features of git (myself included in that category at times, I've messed up merging to different branches too many times...)

> With the above configuration, anytime you say "git pull" while
> on your v2.6.20 branch will fetch from "stable" and merge their
> 'master' branch in your current branch (i.e. v2.6.20 branch).
That's really cool, thanks for pointing out how to do it.
thanks,
greg k-h
Previous: Rene HermanNext: Linus Torvalds
Message 4 of 16 in “GIT and the current -stable”
  1. Rene HermanApr 14, 2007
  2. Junio C HamanoApr 14, 2007
  3. Rene HermanApr 14, 2007
  4. Greg KHApr 14, 2007
  5. Linus TorvaldsApr 14, 2007
  6. Gerb StralkoApr 14, 2007
  7. Chris WrightApr 14, 2007
  8. Rene HermanApr 14, 2007
  9. Rene HermanApr 14, 2007
  10. Julian PhillipsApr 15, 2007
  11. Brian GernhardtApr 14, 2007
  12. Chris WrightApr 14, 2007
  13. Brian GernhardtApr 14, 2007
  14. Chris WrightApr 14, 2007
  15. Julian PhillipsApr 14, 2007
  16. Uwe Kleine-KönigApr 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.