I am trying to checkout my project to see how git goes. The instructions say:

One-Time Only
To set up this repository in your local environment for the first time:
git clone --branch 6.x-1.x rhouse@git-testing.drupal.org:project/slideshow_creator.git

cd slideshow_creator

However the first of these steps gives me:

$ git-clone --branch 6.x-1.x rhouse@git-testing.drupal.org:project/slideshow_creator.git
error: unknown option `branch'
usage: git-clone [options] [--] []

-q, --quiet be quiet
-n, --no-checkout don't create a checkout
--bare create a bare repository
--naked create a bare repository
-l, --local to clone from a local repository
--no-hardlinks don't use local hardlinks, always copy
-s, --shared setup as shared repository
--template
path the template repository
--reference reference repository
-o, --origin
use instead or 'origin' to track upstream
-u, --upload-pack
path to git-upload-pack on the remote
--depth create a shallow clone of that depth

Note: tried with both "git clone" and "git-clone" - same result.

Comments

eliza411’s picture

My apologies. There had been a line in the directions cross-referencing commands for older version of Git, which may be the problem here that was inadvertently removed. I'll be putting it back shortly.

Would you mind checking your Git version?

In the meantime, http://drupal.org/node/1065850 may hold some answers for how to be successful.

rhouse’s picture

Thanks eliza411, I get:

git version 1.5.6.5

This is the latest available for debian oldstable.

Cheers, Ron.

eliza411’s picture

Yep that's older than the command presented. I am *so* torn about putting in the more difficult to understand old commands and having a link off to the old version. It certainly didn't help you that the link wasn't even there.

webchick’s picture

I'd say let's leave it as a single command that'll work for folks using more recent versions, and link them off to http://drupal.org/node/1065850 if they have problems.

Something like:

git clone --branch master dries@git-testing.drupal.org:project/drupal.git

cd drupal

Did this not work for you? Please check Troubleshooting 'git clone'.

eliza411’s picture

Status: Active » Fixed

I'm closing issues in preparation for deployment. I expect that the second set of instructions will work. Please re-open if that's not the case.

acouch’s picture

Just a note for users the "git clone --branch 7.x-1.x http://git.drupal.org/project/" does not work for Git version 1.6.x and older but does work for 1.7.x

Damien Tournoud’s picture

@acouch: see the "Troubleshooting Git clone." link available on all the git instruction pages.

mikeytown2’s picture

fyi, ran into this and updated the Troubleshooting 'git clone' page to include instructions on compiling git from source on ubuntu.

Might want to add a note to all Git instructions pointing to that page for this error.

David_Rothstein’s picture

It turns out there is a bug here (which explains the discrepancy between the last two comments above).

The "Troubleshooting Git clone" link currently only appears when you're viewing a project you don't maintain. When viewing your own projects, no such link is to be found.

It looks like this needs to be fixed in http://drupal.org/project/project_git_instructions so I've filed an issue there with a simple patch: #1075982: "Troubleshooting Git clone" link does not appear for projects you maintain

A quick commit/deploy of that patch would probably help a lot of people out.... It's mighty confusing to have the first command in the list not actually run for you. I got sent off on a wild Google goose chase after hitting this issue, and it took a while for me to figure out what the problem was. The link would have helped a lot :)

eliza411’s picture

I'm not sure how the linkwent missing, but I've added it back to the maintainer's instructions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sdboyer’s picture

Correction for posterity - the --branch option was added to git clone in version 1.6.5-rc0. There's lots of non-linear releasing (across minor versions) in git.

SeanA’s picture

If you're still using Debian oldstable (lenny) like me, you can upgrade git from the backports repository. Add a line like this to /etc/apt/sources.list:
deb http://backports.debian.org/debian-backports lenny-backports main contrib

After running 'apt-get update', install:
apt-get install -t lenny-backports git-core