Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how does one specify which root to clone under? #329

Open
molleweide opened this issue Jan 10, 2022 · 4 comments
Open

how does one specify which root to clone under? #329

molleweide opened this issue Jan 10, 2022 · 4 comments

Comments

@molleweide
Copy link

molleweide commented Jan 10, 2022

Hi there,

(First of all, many thanks for creating this project!!)

If I want to manage all of my neovim plugins under, eg. ~/code/plugins/nvim, how can I achieve
this with ghq. I have now read through the README a couple of times and I would like
to ask for some help on this.

// Cheers.

@molleweide
Copy link
Author

I found that there already exists a relevant issue at #200.
If I get a response or my problem is resolved I will come back and close.

@teoljungberg
Copy link

You can control this by setting the environment variable GHQ_ROOT (which takes precedence over anything else)

~ % cd /tmp
/tmp % ghq get teoljungberg/dotfiles
    exists /Users/teo/src/github.com/teoljungberg/dotfiles
/tmp % GHQ_ROOT=$(pwd) ghq get teoljungberg/dotfiles
     clone https://github.com/teoljungberg/dotfiles -> /tmp/github.com/teoljungberg/dotfiles
       git clone --recursive https://github.com/teoljungberg/dotfiles /tmp/github.com/teoljungberg/dotfiles
Cloning into '/tmp/github.com/teoljungberg/dotfiles'...
remote: Enumerating objects: 12424, done.
remote: Counting objects: 100% (1520/1520), done.
remote: Compressing objects: 100% (836/836), done.
remote: Total 12424 (delta 915), reused 1221 (delta 630), pack-reused 10904
Receiving objects: 100% (12424/12424), 2.72 MiB | 2.44 MiB/s, done.
Resolving deltas: 100% (7517/7517), done.

@molleweide
Copy link
Author

Hi man, thanks for replying. I was refering to using multiple roots, which is discouraged..

@mlavi
Copy link

mlavi commented Oct 18, 2022

Interesting, perhaps you can set environment variable GHQ_ROOT based on directory with DirEnv or set a different environment setting in .gitconfig per directory/source pattern. I doubt either will work out of the box, but try it out!

See also #300 which seems to be a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants