Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.2 KB

ghq.md

File metadata and controls

29 lines (22 loc) · 1.2 KB
title date slug publish tags
ghq - Remote repo management tool
2023-07-26
ghq-remote-repo-management-tool
true

In all of my 3 Macs, I store all of my code within ~/Code to make it persistent and easy to use across the machines. I use ghq to manage the inner structure.

To use ghq, simply run it anywhere in the terminal with your desired Github repository user/repo or full URL:

$ ghq get narze/garden-astro
# or
$ ghq get https://github.com/narze/garden-astro

If the code is not on the machine yet. The command will clone narze/garden-astro to ~/Code/github.com/narze/garden-astro. (Default root path is ~/ghq but you can override ghq.root in your gitconfig.)

I make a command line alias and add -l parameter (look) to change the path after cloning, and -p to clone with SSH url for using with private Github repositories.

alias gq='ghq get -l -p'

I can just type gq narze/garden-astro in a new terminal session and start coding right away.