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

Re: keeping -RT and mainline tree in single repository

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Apr 8, 2011, 07:52 UTC
Message-ID
<20110408075217.GA25171@kytes>
In-Reply-To
<BANLkTikGMG76QhLaGfs-m-SizcaqnZ0mhA@mail.gmail.com>
Hi Tharindu,
Tharindu Rukshan Bamunuarachchi writes:
Show 10 quoted lines
> at the moment i am pulling latest source from
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> and keep my driver development up-to-date with mainline.
> 
> i need to port my driver to -rt also.
> 
> 1. do i have to pull and use another git repository from RT GIT. i.e.
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
> 2. how can i use current GIT repository to keep sync with both -RT and
> mainline ?

You just need two remotes -- simply run `git remote add rt git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git` to add this remote. Then, `git fetch --all` to fetch from all remotes.

> 3. how can i pull latest commits without switching between branches. (
> i hv two branches ... master & my-own-hacked). Every time i switch to
> master and pull latest code.

A `pull` is a `fetch` plus an additional action depending on the switches and the situation (merge, merge with rebase, ff merge etc). You can run `fetch`, irrespective of the branch you're on. However, you need to switch branches to perform a `merge` operation, because of the way it works.

Hope that helps.
-- Ram
Previous: Tharindu Rukshan Bamunuarachchi
Message 2 of 2 in “keeping -RT and mainline tree in single repository”
  1. Tharindu Rukshan BamunuarachchiApr 8, 2011
  2. Ramkumar RamachandraApr 8, 2011

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.