Benedikt Ritter
← Reproducible Thoughts

gh-get v2.2.0 Released

1 min read

I just released gh-get v2.2.0. gh-get is a GitHub CLI extension that clones repositories into a structured folder layout under ~/github/<owner>/<repo>, similar to ghq.

Here is what is new in this release.

Clone Progress in the Terminal

Before this release, cloning a large repository felt broken. The terminal showed nothing while gh-get was working, and it was easy to think the command had hung. Clone progress is now streamed to the terminal in real time, so you can see what is happening.

Any GitHub URL Works

You could already pass a full https://github.com/owner/repo URL to gh-get. This release takes that further. gh-get now accepts any URL you can copy from your browser: a branch, a tag, a specific commit, a file, a pull request, an issue. It extracts the repository from the URL and clones it.

gh get https://github.com/britter/gh-get/pull/26
gh get https://github.com/britter/gh-get/tree/main
gh get https://github.com/britter/gh-get/blob/main/main.go

All of these will clone britter/gh-get into ~/github/britter/gh-get.

Forking Before Cloning

Sometimes you want to contribute to a repository but you don’t have write access. The usual workflow is to fork it first and then clone your fork. gh-get now handles this automatically.

When you try to clone a repository you don’t have write access to, gh-get will ask whether you want to fork it. If you say yes, it creates the fork under your account and clones that instead.

You can also pass --fork to skip the prompt:

gh get --fork britter/gh-get

If the repository does not allow forking, gh-get falls back to cloning the original and prints a warning.

Upgrade

If you already have gh-get installed, run:

gh extension upgrade get

The full list of changes is in the changelog.

Share:
Benedikt Ritter

Benedikt Ritter

Gradle & NixOS Consultant

Developer productivity consultant with five years at Gradle Inc. building Develocity, and co-founder of TestLens. Apache Software Foundation member and founder of GradleX. I help engineering teams ship faster through better Gradle build tooling and reproducible NixOS infrastructure.