GitEasy

« All commands

Clear-Junk Find or remove ignored files in the active project folder.

Destructive GitEasy v1.5.3

Description

Clear-Junk uses your project's .gitignore to identify files that are considered junk - build outputs, editor leftovers, temporary files, anything you have already declared as not worth saving. By default, Clear-Junk lists what would be removed but takes no action. Pass -Force to actually delete the listed files.

Tracked files are never touched. Files that are untracked but not matched by .gitignore are not touched either; pass -Aggressive together with -Force to also remove those.

Each invocation writes a self-contained diagnostic log file. Successful runs log silently; failures throw a plain-English message and point at the log file with the technical detail.

Recipes

Recipe 1
EXAMPLE 1
Clear-Junk
Recipe 2
EXAMPLE 2
Clear-Junk -Force
Recipe 3
EXAMPLE 3
Find-CodeChange; Clear-Junk; Find-CodeChange

Notes

Safety:

Parameters

-Force optional SwitchParameter
Actually remove the listed files. Without this switch, Clear-Junk only lists what it would remove.
-Aggressive optional SwitchParameter
Together with -Force, also remove untracked files that are not matched by `.gitignore`. Without this, only ignored files are removed.
-LogPath optional String
Override the directory where the diagnostic log for this run is written.
-WhatIf optional SwitchParameter
-Confirm optional SwitchParameter

Was this page helpful? Report an issue or suggest an improvement →