Skip to content

Work remove

work remove - Remove workspace and optionally delete associated branches

Removes a workspace and optionally deletes the associated local and remote branches.

By default, this command: 1. Validates the workspace can be safely removed 2. Switches to main branch (if in the workspace being removed) 3. Removes the workspace from git tracking 4. Deletes the local branch 5. Preserves the remote branch 6. Informs you if the workspace folder still exists for manual deletion

Use --debug to enable detailed logging to out/logs/work/.

Flags

Flag Description
--keep-branch (default: false) Keep local branch after removing workspace
--delete-remote (default: false) Delete remote branch as well
-f, --force (default: false) Force remove even with uncommitted changes
-d, --debug (default: false) Enable debug logging

Notes

Expected Output:

  • Workspace removed from git tracking
  • Local branch deleted (unless --keep-branch)
  • Information about manual folder deletion if needed

Examples

work remove                              # Remove current workspace
work remove feature/old-feature          # Remove specific workspace
work remove --keep-branch                # Keep local branch
work remove --delete-remote              # Delete remote branch too
work remove --force                      # Remove even with uncommitted changes
work remove --debug                      # Enable debug logging

See Also


Tutorials | How-to Guides | Explanation | Reference

You are here: Reference — information-oriented technical descriptions of the system.