Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can have multiple <code>.gitignore</code>, each one of course in its own directory.<br> To check which gitignore rule is responsible for ignoring a file, use <a href="https://git-scm.com/docs/git-check-ignore" rel="noreferrer"><code>git check-ignore</code></a>: <code>git check-ignore -v -- afile</code>.</p> <p>And you can have different version of a <code>.gitignore</code> file per branch: I have already seen that kind of configuration for ensuring one branch ignores a file while the other branch does not: see this <a href="https://stackoverflow.com/questions/2250040/using-github-to-host-public-git-repositories-whilst-ensuring-that-sensitive-data/2250144#2250144">question for instance</a>.</p> <p>If your repo includes several independent projects, it would be best to reference them as <strong>submodules</strong> though.<br> That would be the actual best practices, allowing each of those projects to be cloned independently (with their respective <code>.gitignore</code> files), while being referenced by a specific revision in a global parent project.<br> See <a href="https://stackoverflow.com/questions/1979167/git-submodule-update/1979194#1979194">true nature of submodules</a> for more.</p> <hr> <p>Note that, since git 1.8.2 (March 2013) you can do a <a href="http://git-scm.com/docs/git-check-ignore" rel="noreferrer"><code>git check-ignore -v -- yourfile</code></a> in order to see which gitignore run (from which <code>.gitignore</code> file) is applied to '<code>yourfile</code>', and better understand why said file is ignored.<br> See "<a href="https://stackoverflow.com/a/18953923/6309">which <code>gitignore</code> rule is ignoring my file?</a>"</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