git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What is XDG_CONFIG_HOME for exactly?
@ 2015-03-15 23:37 Robert Dailey
  2015-03-15 23:50 ` Robert Dailey
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Dailey @ 2015-03-15 23:37 UTC (permalink / raw)
  To: Git

My understanding is that git reads the priority of configuration as follows:

1. <local_repo>/.git/config
2. $HOME/.gitconfig
3. $XDG_CONFIG_HOME/git/config
4. system level git config (not sure exactly where this is; not
relevant to me on Windows)

I have a .gitconfig in Dropbox that I symlink to my home directory on
different platforms. Specifically, I share this gitconfig across
Cygwin/msys on Windows and Ubuntu.

If I can use XDG_CONFIG_HOME to leverage platform-specific settings,
I'd be able to keep platform-agnostic settings in my $HOME/.gitconfig
and put platform-specific settings in $XDG_CONFIG_HOME/git/config and
simply give XDG_CONFIG_HOME a different name on different platforms.

Is this what it was designed for? If not, what would be the best
approach for this? I was thinking of contributing a patch that would
let you specify the name of your git config in the home directory, but
I'm not sure if that is necessary. Something like this:

$HOME/$GIT_CONFIG_FILENAME, where GIT_CONFIG_FILENAME defaults to
".gitconfig" if it is not set or empty.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-16  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15 23:37 What is XDG_CONFIG_HOME for exactly? Robert Dailey
2015-03-15 23:50 ` Robert Dailey
2015-03-15 23:59   ` Robert Dailey
2015-03-16  9:31   ` Matthieu Moy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).