Git Clients

ghq – organise local clones of remote repositories

ghq is a command-line tool for organising local clones of remote repositories.

It stores repositories under a consistent root directory, by default ~/ghq, using a host/user/project directory layout. This makes it easier to keep many repositories tidy, locate checked-out projects, and avoid scattering clones across unrelated directories.

The tool can clone repositories from compact names or full URLs, list existing local repositories, remove managed clones, create new repositories, and migrate existing checkouts into its managed directory structure. It’s particularly useful for developers who regularly work across multiple GitHub projects, self-hosted repositories, or mixed source control environments.

This is free and open source software.

Key Features

  • Clones remote repositories into a predictable host/user/project directory hierarchy.
  • Lists managed local repositories, with optional query matching and full-path output.
  • Updates existing clones when requested instead of duplicating repositories.
  • Supports shallow, bare, branch-specific, recursive, and partial clone options for Git repositories.
  • Supports multiple ghq root directories, with one primary root used for new clones.
  • Can remove managed local repositories, with a dry-run option for safety.
  • Migrates existing repository directories into the ghq-managed layout.
  • Uses git-config variables for configuration, including root paths, default host, and VCS settings.
  • Cross-platform support – runs under Linux, macOS, and Windows.

Website: github.com/x-motemen/ghq
Support:
Developer: x-motemen
License: MIT License

ghq commands

ghq is written in Go. Learn Go with our recommended free books and free tutorials.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments