README.md 919 字节
Newer Older
1 2
# A Collection of Useful .gitignore Templates

C
a note  
Chris Wanstrath 已提交
3 4 5
That's what we're trying to build. Please contribute
by [forking][fk] and sending a [pull request][pr].

C
Chris Wanstrath 已提交
6 7 8
Also **please** only modify **one file** per commit. This'll
make merging easier for everyone.

C
Chris Wanstrath 已提交
9 10
Global gitignores (OS-specific, editor-specific) should go into the
`Global/` directory.
C
Chris Wanstrath 已提交
11

C
Chris Wanstrath 已提交
12 13
For more information on gitignore: [gitignore(5)][g5]

C
a note  
Chris Wanstrath 已提交
14 15
[fk]: http://help.github.com/forking/
[pr]: http://help.github.com/pull-requests/
C
Chris Wanstrath 已提交
16
[g5]: http://man.cx/gitignore
17 18 19 20 21 22

## Global Ignores

git has a global configuration that applies rules to all of
your projects. For example:

D
duritong 已提交
23
    git config --global core.excludesfile ~/.global_ignore
24 25 26 27 28 29

... will apply the rules in ~/.global_ignore for all of your repos.

This is useful if you use an editor (like Emacs) that drops backup files,
or if you work in an environment that generates binary or intermediate
files that are always ignored.