2016-11-18 18:31:10 +03:00
|
|
|
# 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`
|
|
|
|
|
2017-04-17 19:54:29 +03:00
|
|
|
- Show what files would be deleted without actually deleting them:
|
2016-11-18 18:31:10 +03:00
|
|
|
|
|
|
|
`git clean --dry-run`
|
2016-12-23 12:30:14 +03:00
|
|
|
|
2017-02-04 13:37:09 +03:00
|
|
|
- Forcefully delete files that are not tracked by git:
|
2016-12-23 12:30:14 +03:00
|
|
|
|
|
|
|
`git clean -f`
|
|
|
|
|
2017-02-04 13:37:09 +03:00
|
|
|
- Delete untracked files, including ignored files in `.gitignore` and `.git/info/exclude`:
|
2016-12-23 12:30:14 +03:00
|
|
|
|
|
|
|
`git clean -x`
|