简体   繁体   中英

how can i git clone an specific release?

well, i saw some guys talking about cloning a git release but i didnt understand it and i followed the turorial given by them

How to git clone a specific release?

this is the tutorial command given by them.

$ git clone  git@github.com:mygitname/theproject.git --branch 1.0.2

here are some commands that i tried

~ $ git clone  git@github.com:discordjs/discord.js --branch 13.2.0
Cloning into 'discord.js'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
~ $ git clone https://github.com/discordjs/discord.js/releases/tag/13.2.0
Cloning into '13.2.0'...
fatal: https://github.com/discordjs/discord.js/releases/tag/13.2.0/info/refs not valid: could not determine hash algorithm; is this a git repository?
~ $ git clone discordjs/discord.js --branch 13.2.0
fatal: repository 'discordjs/discord.js' does not exist

but nothing really worked, could you help me? i will be thankful

well, something hapoened when i tried this command.

~ $ git clone https://github.com/discordjs/discord.js --branch 13.2.0
Cloning into 'discord.js'...
remote: Enumerating objects: 60529, done.
remote: Counting objects: 100% (329/329), done.
remote: Compressing objects: 100% (234/234), done.
Receiving objects:   2% (1211/60529), 324.01 KiB | 630.00 KReceiving objects:   2% (1812/60529), 324.01 KiB | 630.00 KReceiving objects:   3% (1816/60529), 324.01 KiB | 630.00 KReceiving objects:   4% (2422/60529), 684.01 KiB | 675.00 KReceiving objects:   5% (3027/60529), 1.03 MiB | 693.00 KiBReceiving objects:   6% (3632/60529), 1.03 MiB | 693.00 KiBReceiving objects:   7% (4238/60529), 1.03 MiB | 693.00 KiBReceiving objects:   8% (4843/60529), 1.03 MiB | 693.00 KiBReceiving objects:   8% (5278/60529), 1.03 MiB | 693.00 KiBReceiving objects:   9% (5448/60529), 1.65 MiB | 837.00 KiBReceiving objects:  10% (6053/60529), 1.65 MiB | 837.00 KiBReceiving objects:  11% (6659/60529), 1.65 MiB | 837.00 KiBReceiving objects:  12% (7264/60529), 1.65 MiB | 837.00 KiBReceiving objects:  13% (7869/60529), 2.30 MiB | 935.00 KiBReceiving objects:  14% (8475/60529), 2.30 MiB | 935.00 KiBReceiving objects:  15% (9080/60529), 2.30 MiB | 935.00 KiBReceiving objects:  16% (9685/60529), 2.30 MiB | 935.00 KiBReceiving objects:  17% (10290/60529), 2.30 MiB | 935.00 KiReceiving objects:  18% (10896/60529), 2.30 MiB | 935.00 KiReceiving objects:  18% (11326/60529), 3.51 MiB | 1.17 MiB/Receiving objects:  19% (11501/60529), 4.34 MiB | 1.22 MiB/Receiving objects:  19% (12037/60529), 4.34 MiB | 1.22 MiB/Receiving objects:  20% (12106/60529), 5.28 MiB | 1.30 MiB/Receiving objects:  21% (12712/60529), 6.01 MiB | 1.31 MiB/Receiving objects:  21% (12777/60529), 6.01 MiB | 1.31 MiB/Receiving objects:  22% (13317/60529), 6.58 MiB | 1.37 MiB/Receiving objects:  23% (13922/60529), 7.13 MiB | 1.41 MiB/Receiving objects:  23% (13951/60529), 7.13 MiB | 1.41 MiB/Receiving objects:  24% (14527/60529), 8.21 MiB | 1.43 MiB/Receiving objects:  24% (14635/60529), 8.21 MiB | 1.43 MiB/Receiving objects:  25% (15133/60529), 8.86 MiB | 1.43 MiB/Receiving objects:  26% (15738/60529), 9.83 MiB | 1.37 MiB/Receiving objects:  27% (16343/60529), 9.83 MiB | 1.37 MiB/Receiving objects:  28% (16949/60529), 9.83 MiB | 1.37 MiB/Receiving objects:  28% (17444/60529), 9.83 MiB | 1.37 MiB/Receiving objects:  29% (17554/60529), 11.68 MiB | 1.61 MiBReceiving objects:  30% (18159/60529), 11.68 MiB | 1.61 MiBReceiving objects:  31% (18764/60529), 11.68 MiB | 1.61 MiBReceiving objects:  32% (19370/60529), 11.68 MiB | 1.61 MiBReceiving objects:  32% (19815/60529), 12.59 MiB | 1.60 MiBReceiving objects:  32% (19839/60529), 14.33 MiB | 1.70 MiBReceiving objects:  33% (19975/60529), 15.40 MiB | 1.82 MiBReceiving objects:  34% (20580/60529), 15.40 MiB | 1.82 MiBReceiving objects:  35% (21186/60529), 15.40 MiB | 1.82 MiBReceiving objects:  36% (21791/60529), 16.86 MiB | 2.03 MiBReceiving objects:  37% (22396/60529), 16.86 MiB | 2.03 MiBReceiving objects:  38% (23002/60529), 16.86 MiB | 2.03 MiBReceiving objects:  38% (23352/60529), 16.86 MiB | 2.03 MiBReceiving objects:  39% (23607/60529), 16.86 MiB | 2.03 MiBReceiving objects:  40% (24212/60529), 16.86 MiB | 2.03 MiBReceiving objects:  41% (24817/60529), 18.09 MiB | 2.16 MiBReceiving objects:  42% (25423/60529), 18.09 MiB | 2.16 MiBReceiving objects:  43% (26028/60529), 18.09 MiB | 2.16 MiBReceiving objects:  44% (26633/60529), 18.09 MiB | 2.16 MiBReceiving objects:  45% (27239/60529), 19.15 MiB | 2.25 MiBReceiving objects:  46% (27844/60529), 19.15 MiB | 2.25 MiBReceiving objects:  47% (28449/60529), 19.15 MiB | 2.25 MiBReceiving objects:  48% (29054/60529), 19.15 MiB | 2.25 MiBReceiving objects:  49% (29660/60529), 19.15 MiB | 2.25 MiBReceiving objects:  50% (30265/60529), 19.15 MiB | 2.25 MiBReceiving objects:  50% (30299/60529), 19.15 MiB | 2.25 MiBReceiving objects:  51% (30870/60529), 19.15 MiB | 2.25 MiBReceiving objects:  52% (31476/60529), 19.15 MiB | 2.25 MiBReceiving objects:  53% (32081/60529), 20.39 MiB | 2.32 MiBReceiving objects:  54% (32686/60529), 20.39 MiB | 2.32 MiBReceiving objects:  54% (32964/60529), 21.63 MiB | 2.18 MiBReceiving objects:  55% (33291/60529), 23.54 MiB | 2.21 MiBReceiving objects:  55% (33411/60529), 23.54 MiB | 2.21 MiBReceiving objects:  55% (33821/60529), 25.29 MiB | 2.16 MiBReceiving objects:  56% (33897/60529), 25.29 MiB | 2.16 MiBReceiving objects:  56% (34386/60529), 26.51 MiB | 1.85 MiBReceiving objects:  57% (34502/60529), 26.51 MiB | 1.85 MiBReceiving objects:  57% (34668/60529), 27.91 MiB | 1.65 MiBReceiving objects:  57% (34734/60529), 29.20 MiB | 1022.00 Receiving objects:  57% (34824/60529), 30.05 MiB | 982.00 KReceiving objects:  58% (35107/60529), 31.55 MiB | 1.10 MiBReceiving objects:  58% (35322/60529), 33.34 MiB | 1.31 MiBReceiving objects:  59% (35713/60529), 34.55 MiB | 1.29 MiBReceiving objects:  59% (35812/60529), 34.55 MiB | 1.29 MiBReceiving objects:  60% (36318/60529), 34.55 MiB | 1.29 MiBReceiving objects:  60% (36892/60529), 35.24 MiB | 975.00 KReceiving objects:  61% (36923/60529), 35.24 MiB | 975.00 KReceiving objects:  61% (37442/60529), 36.25 MiB | 1.02 MiBReceiving objects:  62% (37528/60529), 36.99 MiB | 1.33 MiBReceiving objects:  62% (37780/60529), 38.21 MiB | 1.39 MiBReceiving objects:  62% (38015/60529), 39.39 MiB | 1.03 MiBReceiving objects:  63% (38134/60529), 40.00 MiB | 1.03 MiBReceiving objects:  63% (38410/60529), 40.62 MiB | 1.04 MiBReceiving objects:  63% (38528/60529), 41.99 MiB | 1.48 MiBReceiving objects:  64% (38739/60529), 42.61 MiB | 1.40 MiBReceiving objects:  65% (39344/60529), 43.77 MiB | 1.49 MiBReceiving objects:  66% (39950/60529), 43.77 MiB | 1.49 MiBReceiving objects:  66% (40470/60529), 44.24 MiB | 1.26 MiBReceiving objects:  67% (40555/60529), 44.24 MiB | 1.26 MiBReceiving objects:  68% (41160/60529), 44.24 MiB | 1.26 MiBReceiving objects:  69% (41766/60529), 44.24 MiB | 1.26 MiBReceiving objects:  69% (41793/60529), 46.46 MiB | 1.59 MiBReceiving objects:  69% (42028/60529), 47.14 MiB | 1.63 MiBReceiving objects:  70% (42371/60529), 49.00 MiB | 1.76 MiBReceiving objects:  70% (42627/60529), 49.00 MiB | 1.76 MiBReceiving objects:  70% (42973/60529), 50.46 MiB | 1.78 MiBReceiving objects:  71% (42976/60529), 50.46 MiB | 1.78 MiBReceiving objects:  71% (43170/60529), 51.86 MiB | 1.70 MiBReceiving objects:  71% (43349/60529), 53.92 MiB | 1.64 MiBReceiving objects:  72% (43581/60529), 56.21 MiB | 1.86 MiBReceiving objects:  72% (43756/60529), 56.21 MiB | 1.86 MiBReceiving objects:  73% (44187/60529), 59.57 MiB | 2.13 MiBReceiving objects:  73% (44212/60529), 59.57 MiB | 2.13 MiBReceiving objects:  73% (44615/60529), 61.79 MiB | 2.33 MiBReceiving objects:  74% (44792/60529), 62.71 MiB | 2.38 MiBReceiving objects:  74% (45010/60529), 63.67 MiB | 2.36 MiBReceiving objects:  75% (45397/60529), 64.86 MiB | 2.40 MiBReceiving objects:  76% (46003/60529), 66.22 MiB | 2.53 MiBReceiving objects:  76% (46055/60529), 66.22 MiB | 2.53 MiBReceiving objects:  76% (46597/60529), 68.21 MiB | 2.17 MiBReceiving objects:  77% (46608/60529), 68.21 MiB | 2.17 MiBReceiving objects:  77% (46919/60529), 69.53 MiB | 1.10 MiBReceiving objects:  78% (47213/60529), 69.53 MiB | 1.10 MiBReceiving objects:  79% (47818/60529), 69.53 MiB | 1.10 MiBReceiving objects:  80% (48424/60529), 69.53 MiB | 1.10 MiBReceiving objects:  81% (49029/60529), 69.53 MiB | 1.10 MiBReceiving objects:  82% (49634/60529), 69.53 MiB | 1.10 MiBReceiving objects:  83% (50240/60529), 69.53 MiB | 1.10 MiBReceiving objects:  84% (50845/60529), 69.53 MiB | 1.10 MiBReceiving objects:  85% (51450/60529), 69.53 MiB | 1.10 MiBReceiving objects:  86% (52055/60529), 69.53 MiB | 1.10 MiBReceiving objects:  87% (52661/60529), 69.53 MiB | 1.10 MiBReceiving objects:  87% (52874/60529), 69.53 MiB | 1.10 MiBReceiving objects:  88% (53266/60529), 69.53 MiB | 1.10 MiBReceiving objects:  89% (53871/60529), 72.11 MiB | 1.33 MiBReceiving objects:  90% (54477/60529), 72.11 MiB | 1.33 MiBReceiving objects:  90% (55057/60529), 72.57 MiB | 1.26 MiBReceiving objects:  91% (55082/60529), 72.57 MiB | 1.26 MiBReceiving objects:  92% (55687/60529), 73.04 MiB | 1.16 MiBReceiving objects:  93% (56292/60529), 73.04 MiB | 1.16 MiBReceiving objects:  94% (56898/60529), 73.39 MiB | 1.02 MiBReceiving objects:  94% (57319/60529), 73.52 MiB | 780.00 KReceiving objects:  95% (57503/60529), 73.52 MiB | 780.00 KReceiving objects:  96% (58108/60529), 73.52 MiB | 780.00 KReceiving objects:  97% (58714/60529), 73.52 MiB | 780.00 KReceiving objects:  98% (59319/60529), 73.52 MiB | 780.00 KReceiving objects:  99% (59924/60529), 73.52 MiB | 780.00 Kremote: Total 60529 (delta 179), reused 192 (delta 95), pack-reused 60200
Receiving objects: 100% (60529/60529), 73.52 MiB | 780.00 KReceiving objects: 100% (60529/60529), 74.95 MiB | 1.51 MiB/s, done.
Resolving deltas: 100% (41830/41830), done.
Note: switching to '26340acad946989e9a8825966b76c506d82fc641'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

well, nevermind it worked for me lol

The issue is with the git remote url that you're trying with.

Try with the below and it would clone the particular release

git clone https://github.com/discordjs/discord.js.git --branch 13.2.0

The reasons why the ones you are trying with are not working:

// the remote url is an ssh url and you probably don't have ssh installed
git clone git@github.com:discordjs/discord.js --branch 13.2.0

//not valid git remote urls
git clone https://github.com/discordjs/discord.js/releases/tag/13.2.0
git clone discordjs/discord.js --branch 13.2.0 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM