Skip to main content

Command Palette

Search for a command to run...

Welcome to Github CLI 1.0

Published
•2 min read•View as Markdown
Welcome to Github CLI 1.0
S

I am a Software engineer with the mindset of providing cloud-based solutions with event-driven and test-driven architecture to real-world problems. I build and maintain backend systems with the python framework Django and provide seamless relationships between development and operations processes.

Good day guys, in this post i will be discussing on something a little bit different from my other posts, if you have been following my blog i have been talking mostly on django related stuff, today i have something better.

I will be discussing on GitHub CLI 1.0, i will be covering some basic commands of the github cli. Let's dive in

What is Github CLI?

Github CLI simply means Github Command Line Interface. In essence this means performing all operations you do on github (web) in the cli, meaning you don't have to leave your terminal to create a repo, fork a repo, make pull requests etc.

To install Github CLI on your Windows PC click here.

To install it on your Mac via MacPorts run this command

sudo port install gh

To install it on your Linux machine there is a detailed explanation on how to do that here

Basic Github CLI commands

  • gh auth login This will log you into your account from the cli giving you access to your account

  • gh repo create <repo-name> To create a repo from your cli just run this command and you're good to go

  • gh clone <repo-name> [directory] What this command does is clone any of your repositories into your specified folders

  • gh repo fork owner/[<repository>] [flags] This provides you with the ability to fork a repo, if you want to clone the repo too it's easy just add the --clone flag

  • gh pr merge [<number> | <url> | <branch>] [flags] This command enabled you to merge an PR if you specify the number, url and branch of the request

Here you have it guys, some of the basic commands of the Github CLI, you can find more here. Thanks for reading guys. If you feel there are more commands you feel that are basic do leave them in the comment section below

25 views