threads / discuss / 16682

Specifying default checkout branch in url

Subject: Specifying default checkout branch in url

## tl;dr

2 messages between Dec 11, 2008 and Dec 11, 2008.

replies: 1people: 2as markdown or json

Resul Cetin· Dec 11, 2008, 11:21 UTC · lore

Hi, I have the problem that I want to checkout a specific branch in a git-clone run. Someone at the debian-mentors mailing list[1] has suggested to use a url like git://git.myserver.org/project.git#branchname to checkout a branch with the name branchname by default. But this doesn't seem to work. Is there already another way to encode this in the url? More information why I cannot change HEAD of the repository can be found in a bug report against debcheckout[2].

Regards,
	Resul

[1] http://article.gmane.org/gmane.linux.debian.devel.mentors/34421 [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508433

Mikael Magnusson· Dec 11, 2008, 11:45 UTC · re: Resul Cetin · lore

Re: Specifying default checkout branch in url

2008/12/11 Resul Cetin <Resul-Cetin@gmx.net>:
Show 14 quoted lines
> Hi,
> I have the problem that I want to checkout a specific branch in a git-clone
> run. Someone at the debian-mentors mailing list[1] has suggested to use a url
> like git://git.myserver.org/project.git#branchname to checkout a branch with
> the name branchname by default. But this doesn't seem to work. Is there
> already another way to encode this in the url?
> More information why I cannot change HEAD of the repository can be found in a
> bug report against debcheckout[2].
>
> Regards,
>        Resul
>
> [1] http://article.gmane.org/gmane.linux.debian.devel.mentors/34421
> [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508433
Use a git init, remote add, fetch branchname:branchname sequence.
-- 
Mikael Magnusson

← back to recent threads