Initial commit
This commit is contained in:
13
commands/clean-worktrees.md
Normal file
13
commands/clean-worktrees.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
argument-hint: worktree paths
|
||||
description: Remove git worktrees safely
|
||||
---
|
||||
|
||||
🧹 Remove the following worktrees, as long it is possible to do so without using the `--force` flag.
|
||||
|
||||
$ARGUMENTS
|
||||
|
||||
- Don't bother checking if the repo has changes with `git -C <worktree> status --porcelain`
|
||||
- Don't bother checking for unpushed commits with `git -C <worktree> log`
|
||||
|
||||
Just run `git worktree remove <worktree>` and git will exit with an error code if it's not safe to do so and if `--force` is correctly ommitted.
|
||||
9
commands/commit-chunks.md
Normal file
9
commands/commit-chunks.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
description: Split local changes into multiple logical commits
|
||||
---
|
||||
|
||||
📝 Commit the local changes to git. Analyze my local changes and propose splitting them into multiple logical commits.
|
||||
|
||||
For each proposed commit, show me the message and the list of files. Show all proposals at once. Wait for my confirmation, then commit all.
|
||||
|
||||
See [shared/git-commit-instructions.md](../shared/git-commit-instructions.md) for commit context.
|
||||
5
commands/commit.md
Normal file
5
commands/commit.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Commit local changes to git
|
||||
---
|
||||
|
||||
See [shared/git-commit-instructions.md](../shared/git-commit-instructions.md) for commit context.
|
||||
5
commands/conflicts.md
Normal file
5
commands/conflicts.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Fix all merge conflicts and continue the git rebase
|
||||
---
|
||||
|
||||
See [shared/conflict-resolution-instructions.md](../shared/conflict-resolution-instructions.md) for conflict resolution instructions.
|
||||
20
commands/rebase-all.md
Normal file
20
commands/rebase-all.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
description: Rebase all branches onto a configurable upstream branch
|
||||
---
|
||||
|
||||
Keep all branches in a repository up-to-date by rebasing them onto a configurable upstream branch.
|
||||
|
||||
Initial Rebase Attempt: Run `${CLAUDE_PLUGIN_ROOT}/scripts/git-all` to attempt rebasing all branches.
|
||||
|
||||
- If the command fails with merge conflicts, use the `git-rebase-conflict-resolver` agent to resolve all conflicts in the affected branch
|
||||
- After resolving conflicts run `${CLAUDE_PLUGIN_ROOT}/scripts/git-all` again.
|
||||
- Continue this cycle until the command completes successfully without errors or conflicts.
|
||||
|
||||
When communicating:
|
||||
|
||||
- Clearly indicate which branch you're working on.
|
||||
- Summarize the conflicts found.
|
||||
- Report progress after each iteration.
|
||||
- Notify when the entire rebase process is complete.
|
||||
|
||||
Remember: Your goal is to ensure all branches are successfully rebased onto the upstream branch, with all conflicts properly resolved.
|
||||
44
commands/worktree.md
Normal file
44
commands/worktree.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
argument-hint: branch-name
|
||||
description: Create a git worktree in a peer directory
|
||||
---
|
||||
|
||||
Create a git worktree in a peer directory.
|
||||
|
||||
## Arguments
|
||||
|
||||
The argument should be a kebab-case task name (e.g., "auth-feature", "database-migration").
|
||||
|
||||
The user passed in: `$ARGUMENTS`
|
||||
|
||||
If that text is already kebab case, use it directly as the branch name. Otherwise come up with a good kebab-case name based on what the user passed in.
|
||||
|
||||
## Steps
|
||||
|
||||
- Run `bash ${CLAUDE_PLUGIN_ROOT}/scripts/worktree.sh <branch-name>` from the repository root
|
||||
- If the command exits with a non-success exit code, stop here and give a good summary to the user
|
||||
|
||||
## Conclusion
|
||||
|
||||
Run a command to create a new terminal tab in the newly created worktree.
|
||||
|
||||
If we are running in iTerm:
|
||||
|
||||
```console
|
||||
osascript -e 'tell application "iTerm"
|
||||
tell current window
|
||||
create tab with default profile
|
||||
tell current tab
|
||||
tell current session
|
||||
write text "cd <worktree-absolute-path>"
|
||||
end tell
|
||||
end tell
|
||||
end tell
|
||||
end tell'
|
||||
```
|
||||
|
||||
If we are running in xfce4-terminal:
|
||||
|
||||
```console
|
||||
xfce4-terminal --tab --working-directory="<worktree-absolute-path>" -x bash -c "cd <worktree-absolute-path>; exec bash"
|
||||
```
|
||||
Reference in New Issue
Block a user