diff options
| author | Cameron McEfee <cameron@github.com> | 2011-05-27 16:25:16 -0700 |
|---|---|---|
| committer | Cameron McEfee <cameron@github.com> | 2011-05-27 16:26:19 -0700 |
| commit | 75e24fdca4e70e751332c491a4b60a712e12c9e0 (patch) | |
| tree | ce505c13238ac1243de1026f85f26f848cd16d26 /_posts/2010-01-28-git-ignore.markdown | |
| parent | 379694ab364801b5d06c2070c43fa50594c4bf65 (diff) | |
Reorder files to alphabetize. Update titles to be more conducive to quick scans.
The posts have been re-dated to not only alphabetize them within their categories, but also to make them easier to find with their directory. Files marked 2008 are active post files. Files marked 2009 are outdated or are redirects to newer files. Files have been renamed to match their title for easier updating.
Diffstat (limited to '_posts/2010-01-28-git-ignore.markdown')
| -rw-r--r-- | _posts/2010-01-28-git-ignore.markdown | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/_posts/2010-01-28-git-ignore.markdown b/_posts/2010-01-28-git-ignore.markdown deleted file mode 100644 index 2c2ad40..0000000 --- a/_posts/2010-01-28-git-ignore.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -layout: default -title: Ignoring files -description: How to tell git to ignore files -categories: intermediate ---- - -<p class="intro">From time to time there are files you don't want git to track. There are a few methods of telling git what files to ignore.</p> - -.gitignore ----------- - -If you create a file in your repo named `.gitignore` git will use its rules when looking at files to commit. Note that git will **not** ignore a file that was already tracked before a rule was added to this file to ignore it. In such a case the file must be un-tracked, usually with `git rm --cached filename` - -This file can be committed into the repo, thus sharing the rule list with any other users that clone the repo. - -Note that you can create a `.gitignore` in any subpath to have its rules applied at that path. Sometimes an empty `.gitignore` file is used as a placeholder for an empty path, for example to force git to generate a `log/` path for your development environment to use. - -Global .gitignore -------------- - -A global .gitignore file can also be used by adding one to your global git config. For example, you might create the file `~/.gitignore_global` and add some rules to it. To add this to your config, run `git config --global core.excludesfile ~/.gitignore_global` - -Some good rules to add to this file: - -<pre> -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store? -ehthumbs.db -Icon? -Thumbs.db -</pre> - -Repo exclude ------------ - -Local per-repo rules can be added to the `.git/info/exclude` file in your repo. These rules *are not committed* with the repo so they are not shared with others. This method can be used for locally-generated files that you don't expect other users to generate, like files created by your editor. - -Links ------ - -* [Pro Git](http://progit.org/book/ch2-2.html) -* [gitignore man page](http://www.kernel.org/pub//software/scm/git/docs/gitignore.html) |
