BM: Baca dalam Bahasa Melayu
World 9: Power Tools
GitHub CLI
You will learn: how to use GitHub from your terminal with gh.
The problem
You are deep in the terminal. You spot a bug. Opening the browser breaks your flow. Can you report it from right here?
Pick one answer.
Watch
GitHub CLI (gh): A free tool that talks to GitHub from your terminal. Its command is gh. is a free tool. Its command is gh. Sign in once with gh auth login. Then gh issue create opens an issue, no browser needed.
Try it
gh sorts its jobs into groups. Which group does each job belong to?
Drag a card into a box. Or tap the card, then tap the box.
Hint
Ask: is it about the project, a bug, or a change?Watch
Pushed your branch? gh pr create opens a pull request (PR): Ask others to review and accept your changes. and prints its link. gh pr view --web opens it in your browser.
Try it
Build the command that lists open issues with the bug label.
Tap the pieces in the right order.
Hint
Start with the tool, then the group, then the job.Predict
Your friend Mei has a diary repo. You run gh repo clone mei/diary. What happens?
Pick one answer.
Check
Good habit, or needs work? Swipe each one.
Swipe right for good, left for needs work. Or use the buttons.
Sign in once with gh auth login
You did it!
You can now use GitHub from your terminal with gh.
Go deeper (optional)
gh browse opens the current repo in your browser. gh repo fork --clone makes a fork and copies it in one go. gh api can ask GitHub for almost anything. Get gh from cli.github.com. It works on Windows, macOS and Linux.
Bahasa Melayu
Anda sedang fokus dalam terminal. Tiba-tiba anda nampak pepijat. Buka pelayar akan ganggu fokus anda. Boleh lapor dari sini sahaja?
GitHub CLI ialah alat percuma. Arahannya gh. Log masuk sekali dengan gh auth login. Lepas tu, gh issue create buka issue (laporan masalah) tanpa pelayar.
gh susun kerjanya ikut kumpulan. Setiap kerja ini masuk kumpulan mana?
Dah push branch (cabang) anda? gh pr create buka pull request dan cetak pautannya. gh pr view --web buka ia dalam pelayar anda.
Bina arahan yang senaraikan issue terbuka berlabel bug.
Kawan anda, Mei, ada repo diary. Anda jalankan gh repo clone mei/diary. Apa yang berlaku?
Tabiat baik, atau perlu dibaiki? Leret setiap satu.
Kini anda boleh guna GitHub dari terminal dengan gh.
You finished this before. Practice is always welcome!
Official docs: GitHub CLI manual · gh issue create · gh pr create · About GitHub CLI
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?