One thing I love about GitHub CLI is that it's easy to define aliases. You can run gh alias set ...
to define a new alias and add all sorts of useful commands. Here are two that I use every day:
gh alias set w 'run watch'
I type gh run watch
constantly, so shortening it to gh w
is very handy.
gh alias set merge 'pr merge -d'
This one makes it where typing gh merge
will merge the pr for the current branch, delete the branch on the remote and locally, and switch you back to your main branch.
It's always handy to save a few keystrokes. Define some aliases of your own and share them here in the comments!
Top comments (0)