Remove untracked files
Delete untracked files and directories, including ignored ones. There is no undo
git clean -fdx
More git commands
-
git fetch --all --prune --tagsUpdate all remotes and tags, and delete stale remote-tracking branches
-
git commit --amend -m 'new message'Rewrite the message of the latest commit. Safe only before you push
-
git rebase -i HEAD~5Squash, reorder, or edit last 5 commits
-
git stash push -m 'wip: feature-x' -- src/Stash only the changes in src/ under a clear name
-
git stash list && git stash apply stash@{2}List stashes, then apply one by its index