1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 16:22:08 +02:00
tldr/pages/common/git-clean.md
2018-07-09 22:21:38 +05:30

27 lines
544 B
Markdown

# git clean
> Remove untracked files from the working tree.
- Delete files that are not tracked by git:
`git clean`
- Interactively delete files that are not tracked by git:
`git clean -i`
- Show what files would be deleted without actually deleting them:
`git clean --dry-run`
- Forcefully delete files that are not tracked by git:
`git clean -f`
- Forcefully delete directories that are not tracked by git:
`git clean -fd`
- Delete untracked files, including ignored files in `.gitignore` and `.git/info/exclude`:
`git clean -x`