mix tak.remove (tak v0.4.2)

View Source

Removes a git worktree and releases its port, branch, and database.

$ mix tak.remove <name> [--force] [--yes] [--keep-db]

Steps, in order:

  1. Kill any process using the worktree's port (SIGTERM, then SIGKILL after 2s).
  2. Remove the git worktree directory.
  3. Delete the git branch with git branch -d (safe: skips if the branch is unmerged). Pass --force to use git branch -D instead.
  4. Drop the database with dropdb, but only if tak created it. Pass --keep-db to 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.