threads / discuss / 22021

Specifying excludesfile in a portable way?

Subject: Specifying excludesfile in a portable way?

## tl;dr

4 messages between Dec 24, 2009 and Dec 24, 2009.

replies: 3people: 2as markdown or json

Fyn Fynn· Dec 24, 2009, 03:45 UTC · lore
I have specify an excludesfile in my ~/.gitconfig:
  [core]
      excludesfile = /Users/fynn/.gitexcludes

This works fine for my OS X workstation. But when I sync this .gitconfig to our Linux server, the excludesfile is ignored because my home directory there is /home/fynn.

Is there a way to specify that in a portable way? I tried both ~/.gitexcludes and $HOME/.gitexcludes; neither worked on any platform.

git version on both platforms is 1.6.4

Thanks, Fynn

Jeff King· Dec 24, 2009, 05:53 UTC · re: Fyn Fynn · lore

Re: Specifying excludesfile in a portable way?

On Wed, Dec 23, 2009 at 07:45:14PM -0800, Fyn Fynn wrote:
> Is there a way to specify that in a portable way?  I tried both
> ~/.gitexcludes and $HOME/.gitexcludes; neither worked on any platform.
> 
> git version on both platforms is 1.6.4

Not in v1.6.4, but you can use "~/.gitexcludes" in v1.6.6 (which was just released today).

-Peff
Fyn Fynn· Dec 24, 2009, 07:14 UTC · re: Jeff King · lore

Re: Specifying excludesfile in a portable way?

On Wed, Dec 23, 2009 at 9:53 PM, Jeff King <peff@peff.net> wrote:
> Not in v1.6.4, but you can use "~/.gitexcludes" in v1.6.6 (which was
> just released today).

That's great to hear! But since it can take some time to update git on all machines, is there an alternative for now, e.g. a way to specify all those exclusions in .gitconfig itself?

> -Peff
>
Jeff King· Dec 24, 2009, 07:36 UTC · re: Fyn Fynn · lore

Re: Specifying excludesfile in a portable way?

On Wed, Dec 23, 2009 at 11:14:10PM -0800, Fyn Fynn wrote:
Show 7 quoted lines
> On Wed, Dec 23, 2009 at 9:53 PM, Jeff King <peff@peff.net> wrote:
> > Not in v1.6.4, but you can use "~/.gitexcludes" in v1.6.6 (which was
> > just released today).
> 
> That's great to hear!  But since it can take some time to update git
> on all machines, is there an alternative for now, e.g. a way to
> specify all those exclusions in .gitconfig itself?

No, I don't think there is another way to specify excludes in the config file directly.

-Peff

← back to recent threads