Watch it happen

Guided CLI walkthrough 🎬

Hit Play all to watch every command from zero to a live GitHub repo — with comments explaining what each line does. Or step through one at a time.

New to GitHub? Start with GitHub 101 first.

github-walkthrough — step 1 / 20
Step 1
Step 1.1 — Check if GitHub CLI is installed
# See if the `gh` command already exists on your machine.
you@pc:C:\\Users\\you\\kamei$
manual mode
Step-by-step

The full command cheatsheet 📜

Every command from install → login → first repo → cleanup, with a plain-English explanation and an example for each one. Tap Copy to grab any command.

Your progress
0 / 18 steps done0%
🔧Windows / PowerShell

Step 1 — Install GitHub CLI & Log In

Install the GitHub CLI (gh) on Windows using winget, then log in so gh can talk to your GitHub account.

  1. 1
    PS>gh --version

    Check if the GitHub CLI is already installed. If you see a version number, skip to step 4.

    Example output
    gh version 2.55.0 (2024-08-28)
  2. 2
    PS>winget install --id GitHub.cli

    Install GitHub CLI using Windows' built-in package manager (winget). Accept any prompts. Close and reopen your terminal after it finishes.

  3. 3
    PS>gh --version

    Run again to confirm the install worked. You should now see the version.

    Example output
    gh version 2.55.0
  4. 4
    PS>gh auth login

    Start the login flow. gh will ask you a few questions in the terminal.

  5. 5
    PS>GitHub.com → HTTPS → Login with a web browser

    Pick these answers when prompted: choose GitHub.com, then HTTPS, then 'Login with a web browser'. Copy the one-time code shown, press Enter, paste the code in the browser and authorize.

    Example output
    ! First copy your one-time code: ABCD-1234
    Press Enter to open github.com in your browser...
  6. 6
    PS>gh auth status

    Verify you're logged in. It should show your username and 'Logged in to github.com'.

    Example output
    ✓ Logged in to github.com as Gongchampou (keyring)
    ✓ Git operations for github.com configured to use https protocol.
📂Windows / PowerShell

Step 2 — Create Your Project Folder & Push to GitHub

Make a new folder, turn it into a Git repo, make your first commit, then create a matching repo on GitHub and push — all from the terminal.

  1. 1
    PS>mkdir kamei

    Create a new folder named 'kamei' (use any project name you like).

  2. 2
    PS>cd kamei

    Move into that folder. Every command after this runs inside it.

  3. 3
    PS>dir

    List files in the folder (Windows). It'll be empty for now — that's fine.

  4. 4
    PS>git init

    Turn this folder into a Git repository. A hidden .git folder is created to track changes.

    Example output
    Initialized empty Git repository in C:/Users/you/kamei/.git/
  5. 5
    PS>git status

    See what Git sees: which files are new, changed, or ready to commit.

  6. 6
    PS>git add .

    Stage every file in the folder — tells Git 'include these in my next commit'.

  7. 7
    PS>git commit -m "xxx"

    Save a snapshot with a message. Replace 'xxx' with a short description of what you did.

    Example output
    git commit -m "first commit: add README"
  8. 8
    PS>gh repo create kamei --private --source=. --remote=origin --push

    Create a PRIVATE repo on GitHub named 'kamei', link it to this folder as 'origin', and push your commits — all in one command.

    alt>gh repo create kamei --public --source=. --remote=origin --push # make it PUBLIC instead
  9. 9
    PS>git remote -v

    Confirm the GitHub URL is linked. You should see 'origin' pointing at your new repo.

    Example output
    origin  https://github.com/Gongchampou/kamei.git (fetch)
    origin  https://github.com/Gongchampou/kamei.git (push)
🗑️Windows / PowerShell

Extra — Delete a Repo from the CLI

Cleaning up? You can delete the GitHub repo AND remove Git tracking from your local folder.

  1. 1
    PS>gh repo delete OWNER/REPO

    Delete a repo on GitHub. Replace OWNER with your username and REPO with the repo name. gh will ask you to confirm.

    Example output
    gh repo delete Gongchampou/kamei
  2. 2
    PS>Remove-Item -Recurse -Force .git

    Remove the hidden .git folder so the local folder is no longer a Git repo. Your files stay — only Git history is deleted. (PowerShell command.)

  3. 3
    PS>gh repo list

    Show your remaining GitHub repos to double-check the deletion worked.

Tip: Run these one at a time — read each command's output before typing the next one. If something errors, copy the message and search it; that's how every developer debugs.
Interactive

The CLI Playground 💻

Practice the real Git and GitHub CLI commands here. Nothing installs, nothing breaks. Tap a lesson to auto-run it, or type your own commands. Try help to start.

~/practice — git playground
Welcome to the GitHub CLI Playground 🎉
Type `help` and press Enter to see all commands.

The playground simulates Git behavior for learning — it doesn't touch any real repository.