Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,21 @@ _entr-warn:
@echo "Install entr(1) to automatically run tasks on file change."
@echo "See https://eradman.com/entrproject/ "
@echo "----------------------------------------------------------"


# Remove ignored build artifacts and caches. Untracked files and .env stay.
[group: 'clean']
clean:
git clean -fdX -e '!.env' -e '!.env.*'

# Preview what clean will delete.
[group: 'clean']
clean-dry:
git clean -ndX -e '!.env' -e '!.env.*'

# Remove ignored and untracked files. .env and .env.* stay.
# git clean -x ignores .gitignore and only preserves -e patterns, so .env is named here rather than negated.
[group: 'clean']
[confirm("This will delete all untracked and ignored files. Continue?")]
nuke:
git clean -fdx -e '.env' -e '.env.*'
Loading