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

ghq.root should be able to be specified on a per URL basis #110

Closed
thefotios opened this issue Oct 29, 2018 · 1 comment · Fixed by #228
Closed

ghq.root should be able to be specified on a per URL basis #110

thefotios opened this issue Oct 29, 2018 · 1 comment · Fixed by #228

Comments

@thefotios
Copy link

If we're using conditional includes in the global gitconfig (like this example), any git commands run in different directories may have invalid responses.

It would be very useful if (in conjunction with #109) you could specify a the git.root inside the VCS config block and then use that to cd before any other commands.

Example:

# .gitconfig-work
[url "[email protected]:"]
  insteadOf = gl:
  insteadOf = ssh://gl/
  insteadOf = https://gl/
# .gitconfig
[includeIf "gitdir:~/code/work/"]
  path = .gitconfig-work

[ghq "gl:"]
  root = ~/code/work
@Songmu
Copy link
Member

Songmu commented Dec 24, 2019

Implemented at #228 and released as v0.17.0.
Try it. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants