[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: help with git



On 11-07-21 at 11:10am, Norbert Preining wrote:
> I now want to include upstream git into a branch, either the upstream
> branch itself, or some other/new one, but I have no idea how
> to set that up? 
> 
> Can someone help me here? The remote is some
> 	git://gitorious.org/<owner>/<proj>.git
> 
> By now I have added a remote to my .git/config:
> [remote "upstream-git"]
>         url = git://gitorious.org/mu/mu-ng.git
>         fetch = +refs/heads/*:refs/remotes/upstream-git/*
>         tagopt = --tags
> 
> Set up with git remote add --tags upstream-git git://gitorious.org/mu/mu-ng.git
> 
> But somehow I don't manage to get a branch that follows that remote.
> I tried to add:
> [branch "upstream-new"]
>         remote = upstream-git
>         merge = refs/heads/master
> but that tells me:
> 	Your configuration specifies to merge with the ref 'master'
> 	from the remote, but no such ref was fetched.
> 
> Sorry, I am a bit at loss here. Any suggestions how to do this 
> properly?

I would, instead of editing the config, use this command:

  git checkout -B --track upstream-git/foo bar

With foo being the branch as named upstream and bar being what you want 
to call it locally.


The core Sugar packages track upstream git as well.  You may find some 
inspiration in the debian/README.source file of e.g. sugar-base 
(ignoring the CDBS parts if you don't use that).


Hope that helps,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature


Reply to: