🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
⚠️ Malware / Trojaner / VirenVorsicht: Android-Malware verschlüsselt Ihre Handys und nimmt heimlich Fotos auf(11.09.2026 um 09:35 Uhr)
🕵️ SicherheitslückenMicrosoft geht endlich eines der nervigsten Probleme von Windows 11 an(11.09.2026 um 11:58 Uhr)
💾 IT Security ToolsSysinternals Suite(11.09.2026 um 12:00 Uhr)
🕵️ SicherheitslückenDefender 0-Day ShieldBreak (CVE-2026-69414) nicht sauber gepatcht - BornCity(11.09.2026 um 12:52 Uhr)
🔧 AI Nachrichten Stealing AI Reasoning Traces(08.09.2026 um 12:20 Uhr)
🔧 AI Nachrichten AIs as Modern Genies(08.09.2026 um 19:12 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
⚠️ Malware / Trojaner / VirenVorsicht: Android-Malware verschlüsselt Ihre Handys und nimmt heimlich Fotos auf(11.09.2026 um 09:35 Uhr)
🕵️ SicherheitslückenMicrosoft geht endlich eines der nervigsten Probleme von Windows 11 an(11.09.2026 um 11:58 Uhr)
💾 IT Security ToolsSysinternals Suite(11.09.2026 um 12:00 Uhr)
🕵️ SicherheitslückenDefender 0-Day ShieldBreak (CVE-2026-69414) nicht sauber gepatcht - BornCity(11.09.2026 um 12:52 Uhr)
🔧 AI Nachrichten Stealing AI Reasoning Traces(08.09.2026 um 12:20 Uhr)
🔧 AI Nachrichten AIs as Modern Genies(08.09.2026 um 19:12 Uhr)

🔧 Programmierung 🕛 vor 3 Jahren 7 Min Lesezeit
0

GitHub CLI: gives wings to terminal

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

When working with git, youre obviously aware that you need to switch to the web browser to perform various actions on the GitHub repo - Pull Request, Issues, Review... The GitHub CLI tool gives wings to the cmd-line, so you can execute many of these actions without leaving the cmd-line.






Setup



To get started, visit the package manager.



Below are snapshots of install instructions for each supported platform:



  • Windows:


  • macOS:


  • Debian/Ubuntu Linux:





Authenticate GitHub CLI



Authenticate CLI to access your GitHub account.




CODE
gh auth login















GitHub CLI Command Struct



gh command is structured like a tree for grabbing easily. There are basically two levels of commands. The first level consists of the below commands:



  • auth


  • browse


  • issue


  • pr


  • release


  • repo


  • codespace


  • gist


Each command has a second level of command where you specify the operation to perform such as gh pr create or gh repo view.



Let's dive deep into the most commonly used commands.









GitHub Repo Command



Cloning a repo with the gh command is easier than using the git command. You no longer need to type or copy-paste the long Git URL to clone




CODE
gh repo clone OWNER/REPO
gh repo clone mui/material-ui







You can also fork existing repositories to your account easily from the command line.




CODE
gh repo fork cli/cli







To view the description and README of a project hosted on GitHub use the gh repo view command.




CODE
gh repo view facebook/react







Let's create a new GitHub repository from the command line. First, we need to create a new project.




CODE
$ npx create-next-app sample-app
$ cd sample-app







To create a repo from the command line, just run the following:




CODE
$ gh repo create --public
Created repository pvishnuprasaath/sample-app on GitHub
Added remote https://github.com/pvishnuprasaath/sample-app.git

# Push your project code to your new remote repository
$ git push -u origin main













Pull Request Command



If you know classic git flow , creating PR is quite an effort. GitHub CLI makes it easy to create PR directly from your terminal. After a git commit, you can execute gh pr create. It will prompt a couple of inputs. Post that, the PR link is displayed in the terminal.



Heres the full output:




CODE
$ gh pr create
Creating pull request for feature-1 into master in pvishnuprasaath/sample-app
? Title Added new feature
? Body Implemented and testted new feature for ABC
? What is next? Submit
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 328 bytes | 328.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for 'feature-1' on GitHub by visiting:
remote: https://github.com/pvishnuprasaath/sample-app/pull/new/feature-1
remote:
To https://github.com/pvishnuprasaath/sample-app.git
* [new branch] HEAD -> feature-1
Branch 'feature-1' set up to track
remote branch 'feature-1' from 'origin'.
https://github.com/pvishnuprasaath/sample-app/pull/3







A short version:




CODE
gh pr create --title "PR title" --body "PR body"







To view all the pull requests in the current repo, run gh pr list




CODE
$ gh pr list
Showing 1 of 1 pull request in pvishnuprasaath/sample-app
#3 Added new feature feature-1







Use the command gh pr checkout <number> to checkout a PR. This command will pull the remote feature branch and switch to it. gh pr diff will show the delta for the current PR.



Lets take a look at the gh pr merge command. As youre probably aware, GitHub checks for vulnerabilities in your code and provides solutions via bump pull requests. Heres an example:



Merging multiple PRs one by one is a tiring process. gh pr merge makes it easy to merge a particular PR directly from the terminal.




CODE
$ gh pr merge 4
? What merge method would you like to use? Create a merge commit
remote: Counting objects: 100% (1/1), done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), 624 bytes | 89.00 KiB/s, done.
From https://github.com/pvishnuprasaath/sample-app
* branch main -> FETCH_HEAD
09f8c52..7a8a3f2 main -> origin/main
Updating 09f8c52..7a8a3f2
Fast-forward
src/data/data.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Deleted branch FixLink and switched to branch main







Additional gh pr commands



  • : show the status of relevant pull requests.


  • : add a review to a pull request.


  • : reopen a pull request.


By now, there isn't a way to revert PR from the GitHub CLI yet :(









Issue Command



: displays the title, body, and other information about an issue.


  • : close an issue.


  • for new features and detailed info on using the existing commands.

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
  • Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    1 Quelle
    Stealing AI Reasoning Traces
    1 Quelle
    AIs as Modern Genies
    1 Quelle
    Bitcoin: KI-Hacker räumen Millionen ab! Wird Künstliche Intelligenz zum Problem? - ftd.de
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten GitHub CLI: gives wings to terminal

    Thematisch verwandte Begriffe: GitHub, gives, wings, terminal · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...