Le jeudi 21 juillet 2011 10:11:37, Jonas Smedegaard a écrit : > 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
I would also precede it with git remote add upstream-git <url-of-upstream-git> to ease the use of upstream repository. > > 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
signature.asc
Description: This is a digitally signed message part.