Listing 1.7: An augmented .gitignore file

Listing 1.6 causes Git to ignore files such as log files, Rails
temporary (tmp) files, and SQLite databases. (For example, to ignore log
files, which live in the log/ directory, we use log/*.log to ignore all
files that end in .log.) Most of these ignored files change frequently
and automatically, so including them under version control is
unnecessary. Moreover, when collaborating with others, these irrelevant
changes can cause frustrating conflicts.

The .gitignore file in Listing 1.6 is a good start, but for convenience
and security (Listing 3.2) I recommend using Listing 1.7 instead. This
augmented .gitignore arranges to ignore Rails documentation files, Vim
and Emacs swap files, and (for OS X users) the weird .DS_Store
directories created by the Mac Finder application. If you want to use
this broader set of ignored files, open up .gitignore in your favorite
text editor and fill it with the contents of Listing 1.7.