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.
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.
Install the GitHub CLI (gh) on Windows using winget, then log in so gh can talk to your GitHub account.
gh --versionCheck if the GitHub CLI is already installed. If you see a version number, skip to step 4.
gh version 2.55.0 (2024-08-28)
winget install --id GitHub.cliInstall GitHub CLI using Windows' built-in package manager (winget). Accept any prompts. Close and reopen your terminal after it finishes.
gh --versionRun again to confirm the install worked. You should now see the version.
gh version 2.55.0
gh auth loginStart the login flow. gh will ask you a few questions in the terminal.
GitHub.com → HTTPS → Login with a web browserPick 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.
! First copy your one-time code: ABCD-1234 Press Enter to open github.com in your browser...
gh auth statusVerify you're logged in. It should show your username and 'Logged in to github.com'.
✓ Logged in to github.com as Gongchampou (keyring) ✓ Git operations for github.com configured to use https protocol.
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.
mkdir kameiCreate a new folder named 'kamei' (use any project name you like).
cd kameiMove into that folder. Every command after this runs inside it.
dirList files in the folder (Windows). It'll be empty for now — that's fine.
git initTurn this folder into a Git repository. A hidden .git folder is created to track changes.
Initialized empty Git repository in C:/Users/you/kamei/.git/
git statusSee what Git sees: which files are new, changed, or ready to commit.
git add .Stage every file in the folder — tells Git 'include these in my next commit'.
git commit -m "xxx"Save a snapshot with a message. Replace 'xxx' with a short description of what you did.
git commit -m "first commit: add README"
gh repo create kamei --private --source=. --remote=origin --pushCreate a PRIVATE repo on GitHub named 'kamei', link it to this folder as 'origin', and push your commits — all in one command.
gh repo create kamei --public --source=. --remote=origin --push # make it PUBLIC insteadgit remote -vConfirm the GitHub URL is linked. You should see 'origin' pointing at your new repo.
origin https://github.com/Gongchampou/kamei.git (fetch) origin https://github.com/Gongchampou/kamei.git (push)
Cleaning up? You can delete the GitHub repo AND remove Git tracking from your local folder.
gh repo delete OWNER/REPODelete a repo on GitHub. Replace OWNER with your username and REPO with the repo name. gh will ask you to confirm.
gh repo delete Gongchampou/kamei
Remove-Item -Recurse -Force .gitRemove the hidden .git folder so the local folder is no longer a Git repo. Your files stay — only Git history is deleted. (PowerShell command.)
gh repo listShow your remaining GitHub repos to double-check the deletion worked.
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.
The playground simulates Git behavior for learning — it doesn't touch any real repository.