gh¶
This document lists some useful gh shortcuts for GitHub CLI.
Creating a new public repository and pushing the current directory¶
To create a new public repository and push the current directory to it:
Changing the visibility of an existing repository¶
To change the visibility of an existing repository to public:
Other visibility options include private and internal.
Authentication¶
To login to GitHub CLI:
To switch between accounts:
To set up Git to use GitHub CLI for authentication:
Behind the scenes, this command configures Git to use gh as a credential helper, allowing Git to delegate authentication to GitHub CLI when interacting with GitHub repositories.