Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To clarify a bit on what others have said, there are rougly three categories of stuff that are excluded, and git uses different exclude files for each category:</p> <ol> <li><p>Stuff that everybody working on the project wants to exclude &mdash; e.g. <code>*.o</code>, the names of the generated executables, other build-generated files that you don't want to check in.</p> <p>For this case, you use <code>.gitignore</code> in the project directories (as you're doing). Since you want everybody working on the project to share these excludes, you should add the these <code>.gitignore</code> files using <code>git add</code> and commit them like source files.</p></li> <li><p>Stuff that you personally want to exclude for all your projects, but others working on the same projects may not. For instance, I use the Emacs editor, which creates backup files like <code>Foo.~1~</code>, so that's something I exclude personally for all my git checkouts</p> <p>For this case, you use a "personal" ignore file, conventionally in your home directory called something like <code>~/.gitignore</code>; the name of this file is actually set as a global git parameter, so for instance, you might do:</p> <pre><code>git config --global core.excludesfile ~/.gitignore </code></pre> <p>[As that's a global setting, you only need to do it once.]</p> <p>So for my Emacs backup files, I add a pattern like <code>*~</code> to <code>~/.gitignore</code>.</p></li> <li><p>Stuff that you want excluded "locally" in a specific working-tree, but maybe not for other working-trees.</p> <p>For this case, you should add exclude entries to the <code>.git/info/exclude</code> file. Since this file is underneath the magic <code>.git</code> directory, the status command will never show it as an untracked file (and you can't add it).</p></li> </ol> <p>Git uses all these exclude files together to decide what's excluded.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload