diff --git a/README.md b/README.md index 09a2b1c..430a0af 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Clean Out All Local Branches](git/clean-out-all-local-branches.md) - [Delete All Untracked Files](git/delete-all-untracked-files.md) - [Dry Runs in Git](git/dry-runs-in-git.md) +- [Excluding Files Locally](git/excluding-files-locally.md) - [Ignore Changes To A Tracked File](git/ignore-changes-to-a-tracked-file.md) - [Intent To Add](git/intent-to-add.md) - [Last Commit A File Appeared In](git/last-commit-a-file-appeared-in.md) diff --git a/git/excluding-files-locally.md b/git/excluding-files-locally.md new file mode 100644 index 0000000..53c861c --- /dev/null +++ b/git/excluding-files-locally.md @@ -0,0 +1,12 @@ +# Excluding Files Locally + +Excluding (read: ignoring) files that should not be tracked is generally +done by listing such files in a tracked `.gitignore` file. Though it doesn't +make sense to list all kinds of excluded files here. For files that you'd +like to exclude that are temporary or are specific to your local +environment, there is another option. These files can be added to the +`.git/info/exclude` file as a way of ignoring them locally. + +Add specific files or patterns as needed to that file and then save it. +Relevant files will no longer show up as untracked files when you `git +status`.