1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 14:02:08 +02:00
tldr/pages/common/git-clean.md
Vitor Henrique 00912fda0c
git-clean: add all mnemonics and improve wording (#12334)
* git-clean: add all mnemonics and improve wording

---------

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
2024-02-24 20:05:56 +05:30

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