GitHub, which Microsoft acquired back in June 2018, has become one of the most popular ways for developers to collaborate on, share, and version control the software they’re working on, as well as using it to distribute code once it’s done. However, up until now, GitHub users had to use a graphical interface to get things done in GitHub, either to submit pull requests, or to track, view or create issues. Now however, with the help of a new command line tool released in beta this week, developers have a new way of working with their code in GitHub.
The new command line tool (or “CLI,” command line interface), “gh” allows developers to stay in their work flow interacting with GitHub right from the terminal. This beta version starts with issues and pull requests, “because developers use them every day.” With the tool, devs can filter lists, view details, create issues or pull requests, and view status. It also allows users to easily check out pull requests:
One of the maintainers reviewed your pull request and requested changes. You probably switched branches since then, so use
ghto checkout the pull request branch. We never remember the right commands either!
Make the changes, push them, and soon enough the pull request is merged—congratulations!