* "exclude" and ".gitignore" for everyone
@ 2009-06-01 13:46 Nikos Chantziaras
2009-06-01 13:58 ` Brian Gernhardt
0 siblings, 1 reply; 4+ messages in thread
From: Nikos Chantziaras @ 2009-06-01 13:46 UTC (permalink / raw)
To: git
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"?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "exclude" and ".gitignore" for everyone
2009-06-01 13:46 "exclude" and ".gitignore" for everyone Nikos Chantziaras
@ 2009-06-01 13:58 ` Brian Gernhardt
2009-06-01 14:16 ` Nikos Chantziaras
2009-06-01 14:36 ` Matthieu Moy
0 siblings, 2 replies; 4+ messages in thread
From: Brian Gernhardt @ 2009-06-01 13:58 UTC (permalink / raw)
To: Nikos Chantziaras; +Cc: git
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "exclude" and ".gitignore" for everyone
2009-06-01 13:58 ` Brian Gernhardt
@ 2009-06-01 14:16 ` Nikos Chantziaras
2009-06-01 14:36 ` Matthieu Moy
1 sibling, 0 replies; 4+ messages in thread
From: Nikos Chantziaras @ 2009-06-01 14:16 UTC (permalink / raw)
To: git
Brian Gernhardt wrote:
> On Jun 1, 2009, at 9:46 AM, Nikos Chantziaras wrote:
>> [...]
>> 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!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "exclude" and ".gitignore" for everyone
2009-06-01 13:58 ` Brian Gernhardt
2009-06-01 14:16 ` Nikos Chantziaras
@ 2009-06-01 14:36 ` Matthieu Moy
1 sibling, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2009-06-01 14:36 UTC (permalink / raw)
To: Brian Gernhardt; +Cc: Nikos Chantziaras, git
Brian Gernhardt <benji@silverinsanity•com> writes:
> Generally, I'd suggest putting [...] your editor's garbage in
> exclude.
better: put them in a user-wide ignore file.
in ~/.gitconfig:
[core]
excludesfile = /home/yourlogin/.gitignore
then put whatever you want in $HOME/.gitignore.
--
Matthieu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-01 14:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01 13:46 "exclude" and ".gitignore" for everyone Nikos Chantziaras
2009-06-01 13:58 ` Brian Gernhardt
2009-06-01 14:16 ` Nikos Chantziaras
2009-06-01 14:36 ` Matthieu Moy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox