mirror of
https://github.com/mike-rambil/Advanced-Git.git
synced 2026-05-05 14:42:20 -05:00
756 B
756 B
⬅️ Back to How to Use git worktree Safely
⬆️ Previous Step: Create a New Worktree
Remove a Worktree
Command
git worktree remove <worktree-path>
Examples
- Detach a worktree without deleting the files.
git worktree remove ../feature-branch
Steps
- Detach a worktree without deleting the files.
Warnings
- ⚠️ Make sure you have committed all changes before removing a worktree.
➡️ See the Next Step: Switch Between Worktrees
Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, remove