GitHub CLI
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. 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. 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 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 Create a new folder (use any project name — set yours in the box).
cd Move 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 --private --source=. --remote=origin --pushCreate a PRIVATE repo on GitHub named after your project, link it as 'origin', and push your commits.
gh repo create --public --source=. --remote=origin --pushgit 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 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.
gh repo listShow your remaining GitHub repos to double-check the deletion worked.
Interactive
Practice real Git and GitHub CLI commands. Nothing installs, nothing breaks. Try help to start.
The playground simulates Git for learning — it doesn't touch any real repository.