git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Charles Kerr <kerr262@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git clone on page 44 of progit-en.1084.pdf (2nd try)
Date: Fri, 4 Jan 2019 03:45:04 -0500	[thread overview]
Message-ID: <20190104084504.GC26014@sigill.intra.peff.net> (raw)
In-Reply-To: <CABMGpwQ5psB0DGJkWSbczAj+cTKXdsJ+cR6YbQhJpZMQZOHNrQ@mail.gmail.com>

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

      reply	other threads:[~2019-01-04  8:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04  0:43 git clone on page 44 of progit-en.1084.pdf (2nd try) Charles Kerr
2019-01-04  8:45 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190104084504.GC26014@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=kerr262@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).