GitHub CLI 1.0 Brings GitHub Directly To Your Terminal
After 6 months of a very successful beta that was introduced in February, the first stable version of GitHub CLI 1.0 was released today. For those who haven’t tried it yet, GitHub CLI is a useful tool that brings full repo functionality to your terminal.
Since developers spend a lot of time on their terminals, GitHub CLI 1.0 helps reduce frequent context switching between the terminal and GitHub.com. This will help them focus and allow them to script more easily and create their own workflows.
Since the beta release, users have created over 250,000 pull requests, performed over 350,000 merges, and created over 20,000 issues with GitHub CLI. It is now available for download at Windows, macOS and Linux.
Using GitHub CLI 1.0 in your workflow
With GitHub CLI 1.0, you can do a number of things such as:
- Run entire GitHub workflow from Terminal (from issues to versions)
- Call the GitHub API to script almost any action and set a custom alias for any command
- Also log in to GitHub Enterprise Server
For example, you can clone the repository you want to work with using
gh repo clone owner/repo.
You can use
gh issue status or
gh issue list –assignee billygriffin to find the next thing you want to work on.
gh pr create to create your pull request on GitHub, once you’re done adding a feature or fixing a bug.
Your colleagues can view your pull request using
gh pr checkout 1337, compare the difference with
gh pr diffand provide light advice if they wish using
gh pr review.
After getting approval for the pull request, you can check if all your tests pass with
gh pr checks. If all is well, you can merge it right away from your terminal using
gh pr merge. GitHub CLI 1.0 will help you further by offering to delete your branch locally and on GitHub.com once it has been merged.
And finally, when you’re ready to cut your next version, just use
gh release create [tag name] and publish your code without ever leaving your command line!
In addition to that, GitHub CLI allows you to create aliases for any command using
gh alias set. And now that you have the mighty one
gh api to directly access the GitHub API, there is no limit to what you can do with
Also Read: How To Use GitHub CLI? [Beginner’s Tutorial]
So give the new GitHub CLI 1.0 a try and share your experiences in the comments box below!
The GitHub CLI 1.0 message brings GitHub directly to your terminal appeared first on Fossbytes.