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.gitcd 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
Comment #1
eliza411 CreditAttribution: eliza411 commentedMy 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.
Comment #2
rhouse CreditAttribution: rhouse commentedThanks eliza411, I get:
git version 1.5.6.5
This is the latest available for debian oldstable.
Cheers, Ron.
Comment #3
eliza411 CreditAttribution: eliza411 commentedYep 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.
Comment #4
webchickI'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:
Did this not work for you? Please check Troubleshooting 'git clone'.
Comment #5
eliza411 CreditAttribution: eliza411 commentedI'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.
Comment #6
acouch CreditAttribution: acouch commentedJust 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
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commented@acouch: see the "Troubleshooting Git clone." link available on all the git instruction pages.
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedfyi, 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.
Comment #9
David_Rothstein CreditAttribution: David_Rothstein commentedIt 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 :)
Comment #10
eliza411 CreditAttribution: eliza411 commentedI'm not sure how the linkwent missing, but I've added it back to the maintainer's instructions.
Comment #12
sdboyer CreditAttribution: sdboyer commentedCorrection for posterity - the
--branch
option was added togit clone
in version 1.6.5-rc0. There's lots of non-linear releasing (across minor versions) in git.Comment #13
SeanA CreditAttribution: SeanA commentedIf 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