Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As per the Git Documentation <a href="https://git-scm.com/docs/git-clean" rel="noreferrer">git clean</a></p> <blockquote> <p>Remove untracked files from the working tree</p> </blockquote> <hr> <p>Step 1 is to show what will be deleted by using the <code>-n</code> option:</p> <pre><code>git clean -n </code></pre> <p>Clean Step - <strong>beware: this will delete files</strong>:</p> <pre><code>git clean -f </code></pre> <ul> <li>To remove directories, run <code>git clean -f -d</code> or <code>git clean -fd</code></li> <li>To remove ignored files, run <code>git clean -f -X</code> or <code>git clean -fX</code></li> <li>To remove ignored and non-ignored files, run <code>git clean -f -x</code> or <code>git clean -fx</code></li> </ul> <p><strong>Note</strong> the case difference on the <code>X</code> for the two latter commands.</p> <p>If <code>clean.requireForce</code> is set to "true" (the default) in your configuration, one needs to specify <code>-f</code> otherwise nothing will actually happen.</p> <p>Again see the <a href="http://git-scm.com/docs/git-clean" rel="noreferrer"><code>git-clean</code></a> docs for more information.</p> <h2>Options</h2> <p><strong>-f</strong></p> <p><strong>--force</strong></p> <p>If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to run unless given -f, -n or -i.</p> <p><strong>-x</strong></p> <p>Don’t use the standard ignore rules read from .gitignore (per directory) and $GIT_DIR/info/exclude, but do still use the ignore rules given with -e options. This allows removing all untracked files, including build products. This can be used (possibly in conjunction with git reset) to create a pristine working directory to test a clean build.</p> <p><strong>-X</strong></p> <p>Remove only files ignored by Git. This may be useful to rebuild everything from scratch, but keep manually created files.</p> <p><strong>-n</strong></p> <p><strong>--dry-run</strong></p> <p>Don’t actually remove anything, just show what would be done.</p> <p><strong>-d</strong></p> <p>Remove untracked directories in addition to untracked files. If an untracked directory is managed by a different Git repository, it is not removed by default. Use -f option twice if you really want to remove such a directory.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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