14 lines
221 B
Bash
Executable File
14 lines
221 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# List all active git worktrees
|
|
#
|
|
# Usage:
|
|
# ./list-worktrees.sh
|
|
|
|
REPO_PATH=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
cd "$REPO_PATH"
|
|
|
|
echo "Active worktrees:"
|
|
git worktree list
|