1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 22:02:07 +02:00
tldr/pages/common/git-clean.md
Sebastiaan Speck 380fd5d441
pages*: convert long-short to short-long syntax (#13567)
* pages*: convert long-short to short-long syntax

* git-add: fix typo
2024-09-03 06:13:42 +05:30

28 lines
605 B
Markdown

# git clean
> Remove files not tracked by Git from the working tree.
> More information: <https://git-scm.com/docs/git-clean>.
- Delete untracked files:
`git clean`
- Interactively delete untracked files:
`git clean {{-i|--interactive}}`
- Show which files would be deleted without actually deleting them:
`git clean --dry-run`
- Forcefully delete untracked files:
`git clean {{-f|--force}}`
- Forcefully delete untracked [d]irectories:
`git clean {{-f|--force}} -d`
- Delete untracked files, including e[x]cluded files (files ignored in `.gitignore` and `.git/info/exclude`):
`git clean -x`