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

Re: Cloning an specific commit from the hash

From
AAAlejandro Aguila <aguilasainz@gmail.com>
Date
Aug 3, 2017, 17:55 UTC
Message-ID
<CA+kp=uq1L7TFjXMCoFaNxq5wCNtKWw48MXFX_Unh-QxDf587dg@mail.gmail.com>
In-Reply-To
<xmqqtw1opnla.fsf@gitster.mtv.corp.google.com>
Thanks Junio!
Is there any chance to find out what are the trees for the dependencies?
Cheers!
On 3 August 2017 at 12:28, Junio C Hamano <gitster@pobox.com> wrote:
Show 43 quoted lines
> Alejandro Aguila <aguilasainz@gmail.com> writes:
>
>> I've been working with Oscomo's project OpenBSC
>> https://github.com/osmocom/openbsc and my old hardware won't work with
>> the latest version, which is 0.15. So I asked for help to osmocom guys
>> and there's someone who told me that his version is working with the
>> same hardware I have, so have gave me the OpenBSC hash for it (
>> 7f100c9712de5c684462e809bf31a58c0c326337 ).
>>
>> To be honest I don't use git more apart of cloning repos, so I would
>> like to know how can I pull the files for that hash. And since OpenBSC
>> has some dependencies that are in osmocom's github repo, I don't know
>> if I can get the version that worked for the one committed in the
>> hash.
>
> When a user of a project that uses Git says "try this version"
> without telling you on which branch that version appears, that
> statement typically means that anybody who clones that project
> would get the commit, i.e.
>
>     $ git clone https://github.com/.../openbsc
>     $ cd openbsc
>     $ git checkout 7f100c9712de
>
> This will give you a checkout without being on any named branch,
> which would be sufficient for you to build; if you want further work
> on top of that commit, you might want to do the last step more like
> so:
>
>     $ git checkout -b mybranch 7f100c9712de
>
> If you are not developing at all, then starting at this URL
>
> https://github.com/osmocom/openbsc/commit/7f100c9712de5c684462e809bf31a58c0c326337
>
> and clicking around, you should be able to find this URL
>
> https://github.com/osmocom/openbsc/archive/7f100c9712de5c684462e809bf31a58c0c326337.zip
>
> which would presumably give you a Zip archive that contains the
> files in that particular commit.
>
>
-- 
Alejandro Aguila Sáinz
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “Cloning an specific commit from the hash”
  1. Alejandro AguilaAug 3, 2017
  2. Junio C HamanoAug 3, 2017
  3. Alejandro AguilaAug 3, 2017
  4. Junio C HamanoAug 3, 2017

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.