git/list[1] front-page[2] threads[3] people[4] search[5] about
 

clone (single) commit id?

From
PHPatrik Hägglund <patrik.h.hagglund@gmail.com>
Date
Aug 17, 2023, 19:45 UTC
Message-ID
<CABtpZSGcL8hkk3HA3ECtt7KeLPOhuB0n7EKN1Tg5ZHpFBE0V0A@mail.gmail.com>

In our CI setup, for reproducibility and performance reasons, I want to be able to clone a repository with only a single given commit id (commit hash). (Using 'git init' + 'git fetch' + 'git checkout' is possible, but more elaborate/low-level.)

At https://lore.kernel.org/git/MN2PR12MB3616C1F2E97A18547740651DF9E29@MN2PR12MB3616.namprd12.prod.outlook.com/ it is stated that:

> Never mind, I see, feature exists but server needs to allow it. Sigh.

However, I'm not able to find this in the Git documentation. Can someone point out how to configure this? Can this be better documented?

/Patrik Hägglund
Next: Jeff King
Message 1 of 4 in “clone (single) commit id?”
  1. Patrik HägglundAug 17, 2023
  2. Jeff KingAug 17, 2023
  3. Patrik HägglundAug 17, 2023
  4. Jeff KingAug 17, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.