Re: [dev] [surf] introduce .gitignore

From: Alexander Huemer <alexander.huemer_AT_xx.vu>
Date: Fri, 15 Mar 2013 09:55:05 +0100

On Fri, Mar 15, 2013 at 04:16:01AM +0800, Chris Down wrote:
> On 15 March 2013 03:52, Alexander Huemer <alexander.huemer_AT_xx.vu> wrote:
> > Hi,
> >
> > On Thu, Mar 14, 2013 at 05:51:14PM +0100, Christoph Lohmann wrote:
> >> On Thu, 14 Mar 2013 17:51:14 +0100 Christian Hesse <list_AT_eworm.de>
> >> wrote:
> >> > this introduces file .gitignore and makes git ignore files generates
> >> > on build process.
> >>
> >> Why is this needed? When suckless moves to the next hip vcs on the block
> >> another file needs to be introduced. So: No, just don’t add these files
> >> to be tracked and the changes will not be committed as change.
> >>
> >
> > It's best practice to have a .gitignore file.
> > I recommend it for all suckless subprojects.
> > You want to explicitly tell the VCS which files are not of interest for
> > it, it can not know by itself.
>
> Yes it can, just don't add them to the index... why would you
> arbitrarily do `git add .' or similar? Just use git in the way that it
> is *supposed* to be used.

Not adding file to the index has nothing to do with git knowing what to
do. In a more complex directory structure like the following you want to
be able to do 'git add dir1' and then have .o files not in the index.

dir1
     file1.c
     file1.o
     file2.c
     file2.o
     file3.c
     file3.o
dir2
     file4.c
     file4.o
     file5.c
     file5.o
     file6.c
     file6.o

Maybe the next argument will be that having such a horrible complex
directory structure is the main problem.

Not using handy infrastructure like .gitignore is like not using
'-Wall', because you _can_ look at the code and find the problem
yourself.

Kind regards,
-Alexander Huemer
Received on Fri Mar 15 2013 - 09:55:05 CET

This archive was generated by hypermail 2.3.0 : Fri Mar 15 2013 - 10:00:06 CET