Use the command line to manage your GitHub projects without opening the web page. The official CLI tool version 1.0 is online today
Xiaocha from Aofei Temple
Quantum Bit Report | Public Account QbitAI
After more than half a year of iteration and improvement, today GitHub CLI has been successfully upgraded from beta version to official version 1.0 and is available to all users.
GitHub CLI allows developers to use the command line (CLI) in the terminal to manage code projects without opening a web page, making work more efficient.
GitHub stated in its official blog that since the beta version was released at the beginning of the year, users have used GitHub CLI to create more than 250,000 pull requests, perform more than 350,000 merges, and create more than 20,000 issues.
GitHub CLI now supports:
-
Handle various GitHub workflows in the terminal, from handling issues to publishing packages;
-
Call the GitHub API to script almost any action and set up custom aliases for any command;
-
In addition to GitHub.com, the CLI can also connect to GitHub Enterprise services.
From now on, developers only need to enter the gh command to quickly check out pull requests, view submitted code differences, query bug issue details, etc.
Installing GitHub CLI
For Debian/Ubuntu users:
For Mac users:
For Windows users, you can install it from the terminal or directly download the msi installation package.
How to use GitHub CLI
GitHub CLI commands are quite easy to remember. They all start with "gh", followed by "alias", "api", "pr", "release", "repo", etc.". These commands are self-explanatory.
For example, gh repo operates on the repository: gh repo clone is to clone the repository, gh repo create is to create a new repository, and gh repo fork is to merge the repository.
The same is true for pull requests. Just add create, checkout, diff, or review after gh pr to implement the corresponding functions.
Another important feature of GitHub CLI is that it supports custom command abbreviations. The operation method is similar to the alias command in Linux.
For example, to search for issues with the bug tag, in the past you would open a web page and filter by tag. If you use the command line without simplification, you would need to enter a long string of commands.
Now just rename this command to bugs, then in the future just type gh bugs to quickly see such problems, greatly improving the efficiency of code maintenance.
The above are just a few simple use cases of GitHub CLI. It can also achieve more powerful functions. If you also want to try it, you might as well take a look at the official manual, which will definitely make your GitHub management more efficient.
Open source address:
https://github.com/cli/cli
Official tutorial:
https://cli.github.com/manual/
-over-
This article is the original content of [Quantum位], a signed account of NetEase News•NetEase's special content incentive plan. Any unauthorized reproduction is prohibited without the account's authorization.
Good course recommendation | Learn Python from scratch
No basic knowledge is required to get started, and a limited-time trial class is available! Scan the QR code to start your Python learning journey immediately:
Quantum Bit QbitAI · Toutiao signed author
Tracking new trends in AI technology and products
One-click triple click "Share", "Like" and "Watching"
Advances in science and technology are being seen every day~
Featured Posts