Default exclude rules for Git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 19, 2008 at 09:06:12AM +0400, Kirill Smelkov wrote:
> On Thu, Sep 18, 2008 at 03:30:35PM -0400, Daniel Barkalow wrote:
> > It's generally better to put a core.excludesfile entry in your 
> > ~/.gitconfig pointing to a ignore file with editor temporaries for the 
> > editor(s) you personally use. This will then apply to all git projects you 
> > work on.
> 
> Yes, this makes sense, thanks.
> 
> I've had to add the following to my ~/.gitconfig
> 
> [core]
>     excludesfile= /home/kirr/.gitignore-kirr
> 
> 
> because it does not work when '~' is used for $HOME
> 
> [core]
>     excludesfile= ~/.gitignore-kirr # does not work
> 
> 
> Is it intended?
> 
> 
> Still I think since a lot of people have to do the same operation, maybe
> it makes sense to put ignores for popular tools right into project's
> .gitignore.

I'm reluctant to put these universal rules to a project-specific
.gitignores, that doesn't feel like the proper solution to me.

I think it would actually make most sense to insert some conservative
default ignore rules to the Git's stock excludes template. (Or better,
have a single file with default Git's exclude rules. Tools newly
installed on the system could even add their entries there during
installation as Git's quest on world dominations progresses.) I'd
shamelessly propose Cogito's set of default excludes for starters:

	*.[ao]
	.*
	!.git*
	tags
	*~
	#*

(or omit the first line if that feels too C-specific - but I think it
should be extremely rare to find files you _want_ to track even in non-C
projects; and I'd argue anytime that by default ignoring hidden files
is absolutely the sanest thing to do.)

I'm not sure if there wouldn't be opposition from others to this,
though. Especially as Junio is extra-careful about backwards
compatibility now after 1.6.0. :-(

-- 
				Petr "Pasky" Baudis
The next generation of interesting software will be done
on the Macintosh, not the IBM PC.  -- Bill Gates
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux