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

Use GIT_DIR environment variable to to set .git directory #787

Merged
merged 1 commit into from Oct 2, 2019
Merged

Use GIT_DIR environment variable to to set .git directory #787

merged 1 commit into from Oct 2, 2019

Conversation

rvbuelow
Copy link
Contributor

@rvbuelow rvbuelow commented Oct 2, 2019

The GIT_DIR environment variable can be used to configure an alternative repository location within GiT. This is very useful i.e. for the management of dotfiles:

alias config='GIT_DIR=~/.local/share/dotfiles GIT_WORK_TREE=~ git'

This patch replaces the hardcoded .git paths in order to make git ignore -p command work correctly if GIT_DIR has been set to another location.

@spacewander spacewander merged commit fd36fc0 into tj:master Oct 2, 2019
@spacewander
Copy link
Collaborator

@rvbuelow
Merged. Thank you!

@rvbuelow rvbuelow deleted the patch-1 branch October 2, 2019 12:13
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 this pull request may close these issues.

None yet

2 participants