Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Using GitHub (optional)

This section is optional and can be skipped.

GitHub is a popular, proprietary Git hosting service. For open-source alternatives, consider Forgejo, Codeberg, Sourcehut, Gerrit, Tangled, or Radicle .

Authenticating with an SSH Key

Using an SSH key is more secure and convenient than a password for authenticating with GitHub.

  1. Generate a new key: Follow GitHub's guide on generating a new SSH key.
  2. Add the key to your account: Follow the guide on adding an SSH key to your GitHub account.

Verify your setup with this command:

ssh -T git@github.com

You should see a success message like: Hi user! You've successfully authenticated...

Creating a New Repository on GitHub

  1. Go to github.com/new.
  2. Choose an owner and a repository name.
  3. Important: If you plan to push an existing local repository, do not initialize the new repository with a README, .gitignore, or license file.
  4. Click "Create repository".

Cloning an Existing Repository

  1. On the repository's GitHub page, click the green "Code" button.

  2. Select the SSH tab and copy the URL.

  3. Run the clone command in your terminal:

    jj git clone <COPIED_URL>