1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-09 18:55:53 +02:00
tldr/pages/common/git-clean.md
Managor db25f60eb1
git-*: convert options to longform and minor fixes (#13441)
Co-authored-by: spageektti <git@spageektti.cc>
Co-authored-by: Fazle Arefin <fazlearefin@users.noreply.github.com>
2024-08-31 13:06:48 +02:00

28 lines
607 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`
- [i]nteractively delete untracked files:
`git clean {{--interactive|-i}}`
- Show which files would be deleted without actually deleting them:
`git clean --dry-run`
- Forcefully delete untracked files:
`git clean {{--force|-f}}`
- Forcefully delete untracked [d]irectories:
`git clean {{--force|-f}} -d`
- Delete untracked files, including e[x]cluded files (files ignored in `.gitignore` and `.git/info/exclude`):
`git clean -x`