Clone any GitHub repo and have it automatically placed in a predictable directory path
List all your local repositories and jump to one using fzf as a fuzzy picker
Pull updates on an already-cloned repository without remembering where it lives on disk
Install with Homebrew or go install, then set GHQ_ROOT or ghq.root in git config if you want a non-default location.
ghq is a command-line tool for organizing Git repository clones on your local machine. Instead of putting cloned repositories wherever you happen to run git clone, ghq keeps everything under a single root directory and organizes them by the host and path of the remote URL. So a repository at github.com/myname/myproject would land at ~/ghq/github.com/myname/myproject. This makes it easy to find any repository you have cloned without remembering where you put it. The main commands are get for cloning a repository, list for seeing what you have locally, and root for showing where the root directory is. The get command accepts a full URL or short forms like user/project (defaulting to GitHub) or just a project name if there is only one match. If a repository is already cloned, get does nothing by default, but adding the update flag pulls the latest changes. There are options for less common cloning needs: shallow clones for when you only need recent history, bare clones, partial clones that skip large files, cloning a specific branch, and recursive cloning for repositories with submodules. For repositories already organized differently on your machine, there is a migrate command that moves them into the ghq directory structure. ghq integrates well with fuzzy finders like fzf, which is a common pairing: you pipe ghq list into fzf, select a repository, and jump to its directory. This makes navigating between projects very fast in a terminal workflow. The tool is written in Go and can be installed with go install, through Homebrew on macOS, or via package managers on several Linux distributions. Configuration is done through a git config file rather than a separate config format.
← x-motemen on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.