LinuxmacOSWindows

Where Does ghq Store Repositories?

ghq repo root directory and the gitconfig keys carrying its settings.

Last updated

ghq clones every repo under one root folder with host and user nesting. The default root sits directly in home. Older installs used a dot folder variant.

Settings ride in gitconfig, not a dedicated file. Root keys plus an env override control placement. That surprises people hunting for a conf file that was never designed.

Where ghq stores this, by platform

Linux
~/ghq

Default clone root with host and user nesting. Legacy dot folder on older installs. Settings as gitconfig root keys with env override supporting multi-roots. No dedicated conf file exists.

macOS
~/ghq

Same root logic and gitconfig keys with POSIX paths.

Windows
%USERPROFILE%\ghq

Same root logic with Windows home paths and gitconfig keys.

Frequently asked questions

How do I move the ghq root?

Move the root folder and update the gitconfig root key or env var to match. Repos keep their host and user nesting. Keep a spare copy until clones resolve.

Where is the ghq.conf file?

There is none. Root and per-URL roots live as gitconfig keys. The env var overrides everything including multi-root lists. Layout stays host, user, repo beneath the root.

Notice an outdated path? Let us know.