"exclude" and ".gitignore" for everyone

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

"exclude" and ".gitignore" for everyone

From: Nikos Chantziaras <hidden>
Date: 2016-06-15 22:46:53

Hello.

I'm a first-time Git user.  I found out how to ignore files with Git. 
For example I've put "*.[oa]" and "*~" in ./git/info/exclude.  However, 
the rest of the persons doing commits in the public repository might not 
have those entries.  Is everyone required to put those entries in 
"exclude" themselves or does Git allow for those to be automatically 
added next time they do a "git pull"?

Re: "exclude" and ".gitignore" for everyone

From: Brian Gernhardt <hidden>
Date: 2016-06-15 22:46:53

On Jun 1, 2009, at 9:46 AM, Nikos Chantziaras wrote:
I'm a first-time Git user.  I found out how to ignore files with  
Git. For example I've put "*.[oa]" and "*~" in ./git/info/exclude.   
However, the rest of the persons doing commits in the public  
repository might not have those entries.  Is everyone required to  
put those entries in "exclude" themselves or does Git allow for  
those to be automatically added next time they do a "git pull"?
If you commit a .gitignore, it will be used by everyone.  .git/info/ 
exclude is for your personal excludes.  Generally, I'd suggest putting  
build products in .gitignore and your editor's garbage in exclude.   
For example:

project/.gitignore:
-------------------
*.o
*.a
random.tmp

project/.git/info/exclude:
--------------------------
.*.swp
*~
/my-todo.txt

If you add and commit the .gitignore file it will be picked up by  
everyone, while whatever backups, temp files, notes, or whatever you  
use can be kept private in your exclude file.

~~ Brian

Re: "exclude" and ".gitignore" for everyone

From: Nikos Chantziaras <hidden>
Date: 2016-06-15 22:46:53

Brian Gernhardt wrote:
On Jun 1, 2009, at 9:46 AM, Nikos Chantziaras wrote:
quoted
[...]
For example I've put "*.[oa]" and "*~" in ./git/info/exclude.  
However, the rest of the persons doing commits in the public 
repository might not have those entries.  Is everyone required to put 
those entries in "exclude" themselves or does Git allow for those to 
be automatically added next time they do a "git pull"?
If you commit a .gitignore, it will be used by everyone.  
.git/info/exclude is for your personal excludes.  Generally, I'd suggest 
putting build products in .gitignore and your editor's garbage in 
exclude.
[...]
If you add and commit the .gitignore file it will be picked up by 
everyone, while whatever backups, temp files, notes, or whatever you use 
can be kept private in your exclude file.
Thanks, Brian!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help