mix tak.remove (tak v0.4.2)
View SourceRemoves a git worktree and releases its port, branch, and database.
$ mix tak.remove <name> [--force] [--yes] [--keep-db]
Steps, in order:
- Kill any process using the worktree's port (SIGTERM, then SIGKILL after 2s).
- Remove the git worktree directory.
- Delete the git branch with
git branch -d(safe: skips if the branch is unmerged). Pass--forceto usegit branch -Dinstead. - Drop the database with
dropdb, but only if tak created it. Pass--keep-dbto skip database removal.
Without --yes, the task prints what it will delete and asks for confirmation.
Arguments
name— the worktree slot name to remove (required)
Options
--force— remove even with uncommitted changes; force-delete the branch--yes— skip the confirmation prompt--keep-db— keep the database instead of dropping it
Examples
$ mix tak.remove armstrong
$ mix tak.remove armstrong --force
$ mix tak.remove armstrong --yes
$ mix tak.remove armstrong --keep-db
Warning
--force deletes the branch even if it has unmerged commits. Make sure
your work is pushed or merged before using it.