Web lists-archives.com

Re: git clone on page 44 of progit-en.1084.pdf (2nd try)




On Thu, Jan 03, 2019 at 04:43:32PM -0800, Charles Kerr wrote:

> I am an easily-derailed newbie reading chapter 2 of progit-en.1084.pdf

Sort of orthogonal to your question, but I think this is a slightly
older version of the book.  Note that it's constantly undergoing
revisions, and the latest version can always be gotten from:

  https://github.com/progit/progit2/releases

(or https://git-scm.com/book, which is updated daily from that
repository).

The content in question is on page 26 in the most recent version, or
here in the web version:

  https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository

Now, on to your actual questions...

> (1) On page 44 of my copy, where it first discusses git clone, there's
> reference to a "linkable library".  How does this relate to
> "repository".  I thought the aim here was to get a clone of a remote
> repository....

That is the aim. They just needed a sample repository to talk about, so
they used the libgit2 repository as an example. And that repository
holds code for a linkable library, but what it holds is not really
important for the example.

I think it would be more clear if the example used some name that was
more obviously an example repository (or even say, the repository for
git itself, which is easy to explain).

> (2) In each of the two example git-clone commands, the "libgit2" appears twice:
> 
> git clone https://github.com/libgit2/libgit2

Right. On GitHub, there is a "libgit2" organization (for all work around
that library), which in turn has a repository named "libgit2" with the
actual library code (other repositories are things like bindings, etc).

But the "user/repo" convention is a GitHub thing (that is also used by
other hosting sites). Git only cares about what's in the final part of
the URL (and even then, only to choose a default directory name for the
local clone).

> What did make sense to me and worked:
> 
> $ git clone https://github.com/komwomak/shtoza SNOW
> 
> My  GitHub user name: komwomak
> The name of the remote repository out on my GitHub stuff: shtoza
> The name of the local repository on the PC: SNOW
>
> I would appreciate knowing whether I have gotten the wrong end of some stick.

I think you understand it perfectly. If you're interested in suggesting
an improvement to the book, you can open an issue or a pull request at
the progit/progit2 repository I linked above.

-Peff