Remove untracked files
Delete untracked files and directories from the working tree. Ignored files stay
git clean -fd
- tool
- git45 commands
- tags
- gitcleanworking-tree
More git commands
-
git branch --merged mainList local branches already merged into main. These are safe to delete
-
git rebase -i HEAD~5Squash, reorder, or edit the last 5 commits
-
git cherry-pick <sha>Apply one commit from another branch to the current one
-
git reflog show --date=relative | head -20Show the last 20 HEAD moves, including that rebase you regret
-
git stash push -m 'WIP: feature-x' -uSave uncommitted work, including untracked files, under a clear label