Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve description of clone #1018

Open
timhoffm opened this issue Oct 6, 2022 · 3 comments
Open

Improve description of clone #1018

timhoffm opened this issue Oct 6, 2022 · 3 comments

Comments

@timhoffm
Copy link

timhoffm commented Oct 6, 2022

I find this description a bit confusing:

Technically, git clone in the real world is the command you'll use to create local copies of remote repositories (from github for example). We use this command a bit differently in Learn Git Branching though -- git clone actually makes a remote repository out of your local one. Sure it's technically the opposite meaning of the real command, but it helps build the connection between cloning and remote repository work, so let's just run with it for now.

"Technically, `git clone` in the real world is the command you'll use to create _local_ copies of remote repositories (from github for example). We use this command a bit differently in Learn Git Branching though -- `git clone` actually makes a remote repository out of your local one. Sure it's technically the opposite meaning of the real command, but it helps build the connection between cloning and remote repository work, so let's just run with it for now.",

  1. I suggest to instead phrase it in one of these ways:
  • Don't go into the distinction which one is the remote: "git clone is the command to create a copy of an existing repository"
  • Or: invert the language: "Assume that a git repository by someone else exists somewhere (typical on another machine/server). You can use clone to get a local copy of that repository."
  1. The example uses git clone without specifying a remote url. Maybe it's worth to require passing in some dummy url git clone https://example.com/myrepo.git to make the example more realistic. Or even make a small example repo on github `git clone https://github.com/pcottle/learnGitBranching-clone-example.git)/, so that the call would work in real life (and users can see the repo in GitHub - though the clone operation in the tutorial is still a dummy of course).
@pcottle
Copy link
Owner

pcottle commented Oct 6, 2022

I like your inverted language suggestion. I think technically git doesn't distinguish between which repository is the main source of truth (any repo can send PRs to another repo) but almost all common usage of Git is done with a main source of truth repository.

But yeah for the purposes of the app maybe we just say "you run this command to get a copy" and go from there as you said 😇

@pcottle
Copy link
Owner

pcottle commented Oct 6, 2022

Feel free to throw up a PR to wordsmith this a bit

@timhoffm
Copy link
Author

timhoffm commented Oct 6, 2022

I like your inverted language suggestion. I think technically git doesn't distinguish between which repository is the main source of truth (any repo can send PRs to another repo) but almost all common usage of Git is done with a main source of truth repository.

There is indeed no main source of truth. However, there is an asymmetry in that the clone has a remote origin set up, but not the other way round. Since the concept of a remote is essential, I think I'll try a two-step description.

  1. "you run this command to get a copy"
  2. "your copy still links to/remembers the original repo as remote origin".

I can try and wordsmith this in a PR, but it will be a couple of days before I come to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants