threads / discuss / 27035

keeping -RT and mainline tree in single repository

Subject: keeping -RT and mainline tree in single repository

## tl;dr

2 messages between Apr 8, 2011 and Apr 8, 2011.

replies: 1people: 2as markdown or json

Tharindu Rukshan Bamunuarachchi· Apr 8, 2011, 07:03 UTC · lore
hi All,

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 ?
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.
Really appreciate if you can point howto/resource ?

Thanks in advance __ Tharindu "R" Bamunuarachchi.

Ramkumar Ramachandra· Apr 8, 2011, 07:52 UTC · re: Tharindu Rukshan Bamunuarachchi · lore

Re: keeping -RT and mainline tree in single repository

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

← back to recent threads