learnGitBranching
learnGitBranching copied to clipboard
Improve description of clone
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.
https://github.com/pcottle/learnGitBranching/blob/a78e4d1327b8cf5eb6bcc2c0300918fab4f26419/src/levels/remote/clone.js#L71
- 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."
- The example uses
git clone
without specifying a remote url. Maybe it's worth to require passing in some dummy urlgit 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).
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 😇
Feel free to throw up a PR to wordsmith this a bit
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.
- "you run this command to get a copy"
- "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.