One Fun Trick with the GitHub CLI

May 04, 2022

One of the most useful things as a GitHub user is their command line interface tool. I discover more uses for it every day. Ever want to share a git stash or put it somewhere that it won’t disappear on you? The GitHub CLI has you covered:

git diff | gh gist create -f my-stash.diff

and then when you’re ready to apply it to your repo (or are sharing with a friend:

gh gist view [gist_id] | git apply

Want to get posts like this in your email?

This work by Matt Zagaja is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.