Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Do not forget, according to <a href="http://git-scm.com/docs/gitignore" rel="noreferrer">gitignore</a>, that there is an order of precedence in the different "ignore pattern sources" that Git consider:</p> <ul> <li>Patterns read from the command line for those commands that support them.</li> <li>Patterns read from a .gitignore file in the same directory as the path, or in any parent directory, with patterns in the higher level files (up to the root) being overridden by those in lower level files down to the directory containing the file. </li> <li>Patterns read from <code>$GIT_DIR/info/exclude</code>.</li> <li>Patterns read from the file specified by the configuration variable <code>core.excludesfile</code>.</li> </ul> <p>The last two can be a solution for your problem but:</p> <ul> <li>they are not replicated for a distant repository</li> <li>they can have their patterns overridden by the other sources </li> </ul> <p>(See also this <a href="https://stackoverflow.com/questions/640449/git-dont-show-me-pyc-in-the-list-of-untracked-files/640668#640668">SO question</a>)</p> <hr> <p>The other two solutions involve updating the index (<a href="http://git-scm.com/docs/git-update-index" rel="noreferrer"><code>git update-index</code></a>):</p> <ul> <li><code>git update-index --assume-unchanged</code>: see "<a href="https://stackoverflow.com/a/6793752/6309">Git: untrack a file in local repo only and keep it in the remote repo</a>".<br> It is mentioned by <a href="https://stackoverflow.com/users/292408/elijah-lynn">Elijah Lynn</a> in <a href="https://stackoverflow.com/questions/653454/how-do-you-make-git-ignore-files-without-using-gitignore/653495#comment39345310_653495">the comments</a>. <ul> <li>You can even ignore a folder content: "<a href="https://stackoverflow.com/a/12288918/6309"><code>git update-index --assume-unchanged</code> on directory</a>". </li> <li>Use <code>--no-assume-unchange</code> to reverse the effect: See "<a href="https://stackoverflow.com/a/23189283/6309">Is it possible to <code>git add</code> a file currently protected by <code>assume-unchanged</code>?</a>".</li> </ul></li> </ul> <p>However, when you checkout another branch or when you <code>git pull</code>, that "ignore" status might be reset. Hence the other option:</p> <ul> <li><code>git update-index --skip-worktree</code>; see: <ul> <li>"<a href="https://stackoverflow.com/a/23011156/6309">ignore my changes in files but don't delete them from remote rep</a>" and </li> <li>"<a href="https://stackoverflow.com/a/9816844/6309">Preserve git --assume-unchanged files between branch checkouts</a>".</li> </ul></li> </ul> <p>The difference between the two is explained in "<a href="https://stackoverflow.com/q/13630849/6309">Git - Difference Between '<code>assume-unchanged</code>' and '<code>skip-worktree</code>'</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. 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