This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.
Ignoring files with Git
The helpful page, <a href="https://help.github.com/articles/ignoring-files" source="GitHub">Ignoring files</a>, taught me something I didn't know: there's a file you can use to ignore files in your local Git repository without changing anyone else's repository. Just to recap, here are the ways to ignore a file: <ul> <b>Global <c>.gitignore</c></b>: you can designate basic exclusion directives that apply to all repositories on your system. This file is not committed to any repository or shared with others. Execute <c>git config --global core.excludesfile ~/.gitignore_global</c> to set the file to <c>~/.gitignore_global</c> (for example). See the <a href="https://help.github.com/articles/ignoring-files">linked article</a> for sample directives. <b>Per-repository global exclusions</b>: add directives to the <c>.git/info/exclude</c> file in any repository. These directives are combined with any system-global directives to form the base exclusions for that repository. This file is not committed with the repository. This is the one I'd never heard of before. <b><c>.gitignore</c></b>: add a file with this name to any directory. The directives in that file are merged with those from the parent directory to define the patterns that are excluded in that directory and all child directories. This is definitely the most common way to exclude files. <b>Exclude versioned files</b>: and, finally, if your repository has files that are changed but not committed (e.g. configuration files), you can ignore future changes to those files with a call to <c>git update-index --assume-unchanged path/to/file.txt</c>. While this can be useful for legacy projects, it's best to structure new projects so developers don't have to rely on easily forgotten tricks like this. </ul>