Skip to content

Commit eb2986d

Browse files
committed
feat: rename to git-wt and simplify (remove gh/jq deps)
1 parent 7914e10 commit eb2986d

3 files changed

Lines changed: 70 additions & 288 deletions

File tree

‎.github/workflows/release.yaml‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
if: steps.release.outputs.released == 'true'
5858
run: |
5959
gh release create "${{ steps.release.outputs.tag }}" \
60-
bin/worktree-switcher \
60+
bin/git-wt \
6161
--title "${{ steps.release.outputs.tag }}" \
6262
--generate-notes
6363
@@ -90,7 +90,7 @@ jobs:
9090
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
9191
9292
# Get SHA256 of the script from release
93-
SHA256=$(curl -sL "https://github.com/${{ github.repository }}/releases/download/${TAG}/worktree-switcher" | shasum -a 256 | cut -d' ' -f1)
93+
SHA256=$(curl -sL "https://github.com/${{ github.repository }}/releases/download/${TAG}/git-wt" | shasum -a 256 | cut -d' ' -f1)
9494
echo "sha256=$SHA256" >> "$GITHUB_OUTPUT"
9595
9696
- name: Clone homebrew-devsetup
@@ -107,7 +107,7 @@ jobs:
107107
class GitWt < Formula
108108
desc "Interactive TUI for git worktree management"
109109
homepage "https://github.com/nsheaps/git-wt"
110-
url "https://github.com/nsheaps/git-wt/releases/download/${{ steps.release.outputs.tag }}/worktree-switcher"
110+
url "https://github.com/nsheaps/git-wt/releases/download/${{ steps.release.outputs.tag }}/git-wt"
111111
sha256 "${{ steps.release.outputs.sha256 }}"
112112
version "${{ steps.release.outputs.version }}"
113113
license "MIT"
@@ -117,19 +117,17 @@ jobs:
117117
end
118118
119119
depends_on "gum"
120-
depends_on "gh"
121-
depends_on "jq"
122120
123121
def install
124122
if build.head?
125-
bin.install "bin/worktree-switcher" => "git-wt"
123+
bin.install "bin/git-wt"
126124
else
127-
bin.install "worktree-switcher" => "git-wt"
125+
bin.install "git-wt"
128126
end
129127
end
130128
131129
test do
132-
assert_match "worktree-switcher", shell_output("#{bin}/git-wt --help")
130+
assert_match "git-wt", shell_output("#{bin}/git-wt --help")
133131
end
134132
end
135133
FORMULA_EOF

‎README.md‎

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Interactive TUI for git worktree management.
88

99
```bash
1010
brew tap nsheaps/devsetup
11-
brew install worktree-switcher
11+
brew install git-wt
1212
```
1313

1414
### Manual
@@ -22,7 +22,7 @@ export PATH="$PATH:$(pwd)/git-wt/bin"
2222
## Usage
2323

2424
```bash
25-
worktree-switcher [OPTIONS] [BRANCH]
25+
git-wt [OPTIONS] [BRANCH]
2626
```
2727

2828
### Arguments
@@ -35,49 +35,39 @@ worktree-switcher [OPTIONS] [BRANCH]
3535

3636
| Option | Description |
3737
| ---------------- | ------------------------------------------------ |
38-
| `--no-status` | Skip fetching branch status (faster) |
3938
| `--scan-dir DIR` | Directory to scan for git repos (default: ~/src) |
40-
| `--repo REPO` | GitHub repo (owner/name) to clone if not in repo |
4139
| `-h, --help` | Show help message |
40+
| `-v, --version` | Show version |
4241

4342
### Examples
4443

4544
```bash
4645
# Interactive mode - select from branches
47-
worktree-switcher
46+
git-wt
4847

4948
# Direct branch switch - find or create worktree for branch
50-
worktree-switcher feature/my-branch
49+
git-wt feature/my-branch
5150

52-
# Clone a repo and create worktree
53-
worktree-switcher --repo nsheaps/git-wt feature/my-branch
54-
55-
# Faster mode without status checks
56-
worktree-switcher --no-status
51+
# Scan a different directory for repos
52+
git-wt --scan-dir ~/projects
5753
```
5854

5955
## Features
6056

6157
- **Direct branch argument**: Pass a branch name to skip interactive selection
6258
- **Smart branch detection**: Finds local, remote, or creates new branches
63-
- **Repo discovery**: When not in a git repo, offers to:
64-
- Scan `~/src` (or custom dir) for existing repos
65-
- Clone from GitHub by selecting from org/user repos
66-
- Enter a path manually
59+
- **Repo discovery**: When not in a git repo, scans `~/src` for existing repos
6760
- **"Switch repository" option**: Step up to change repos during selection
6861
- Shows banner if already in a worktree
6962
- Create new worktrees with new branches
7063
- Select from existing worktrees
71-
- Branch priority (your PRs > your branches > other branches)
7264
- Worktrees created at: `../${repo}.worktrees/${branch}`
7365

7466
## Dependencies
7567

7668
| Tool | Purpose | Installation |
7769
| ----- | ------------------- | --------------------- |
7870
| `gum` | Interactive prompts | `brew install gum` |
79-
| `gh` | GitHub CLI | `brew install gh` |
80-
| `jq` | JSON processing | `brew install jq` |
8171
| `git` | Version control | Usually pre-installed |
8272

8373
## License

0 commit comments

Comments
 (0)