Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

ghq

ghq allows you to clone a project without worrying where the project will be cloned, it allows also to clone while respecting the aborescende of the remote repo.

git clone, it’s simple!

The cloning process with the git clone command may seem simple at first glance. at first glance, but when managing several Git repositories, this can quickly become complex. This is even more true when working with repository forks. The ghq tool simplifies this management by centralizing repositories in a specific location on your machine.

Let’s say you use work with dotfiles and you get a dotfiles with the command ghq get https://github.com/mathiasbynens/dotfiles.git. And now you also want to work on your dotfiles, no need to worry question where you were going to clone your project, you just need to run ghq get https://github.com/badele/dotfiles.git. After executing these orders, the structure of the projects will be clearly organized in your ghq directory.

Additionally, during team collaborations involving script sharing using cloned projects, there is no need to specify paths specific ones such as /usr/local/nosprojets/xxx. For example, it is enough to export a variable, like TEAM_PROJECT=~/ghq, for the whole team and to use this reference in your scripts. So you can use $TEAM_PROJECT/mateam/monprojet/bin/monexecutable in your scripts, ensuring consistency in access to shared resources.

└─ ~/ghq
   └─ github.com
      ├─ mathiasbynens
      │  └─ dotfiles
      └─ badele
         └─ dotfiles

Here is an example of using ghq

ghq demo
ghq demo (generated with vhs demo-ghq.tape)