Skip to content

git-worktree-clone: one-command bare-repo worktree checkout - #63

Draft
alycda wants to merge 2 commits into
mainfrom
claude/git-worktree-clone
Draft

git-worktree-clone: one-command bare-repo worktree checkout#63
alycda wants to merge 2 commits into
mainfrom
claude/git-worktree-clone

Conversation

@alycda

@alycda alycda commented Aug 3, 2026

Copy link
Copy Markdown
Owner

The bare + gitdir-pointer + worktree layout lived as two cryptic cheatsheet fragments and had no runnable home; a justfile recipe would beg the question of which dotfiles copy to invoke. Ship it as a writeShellApplication on home-manager PATH instead: git discovers git-* binaries as subcommands, so it runs as git worktree-clone [flags] <url|owner/repo> [dir]. Clone flags pass through, keeping repo-specific speedups (e.g. ditto's README documents --filter=blob:none) canonical in the target repo. Refuses to clobber an existing checkout. The two cheatsheet fragments fold into one git/worktree/clone sheet: the command plus the recipe it encodes.

🤖 Generated with Claude Code

The bare + gitdir-pointer + worktree layout was two cryptic cheatsheet
fragments (git/worktree/{fetch,gitdir}) that assumed you remembered the
surrounding recipe, and the full procedure had no runnable home. A
justfile recipe would beg the question of which dotfiles copy to invoke
(/opt/dotfiles vs ~/dotfiles vs a working checkout); home-manager PATH
is the one distribution surface every machine class already shares.

Ship it as a writeShellApplication: git discovers git-* binaries as
subcommands, so it runs as `git worktree-clone [flags] <url|owner/repo>
[dir]`. Clone flags pass through, keeping repo-specific speedups (e.g.
ditto's README documents --filter=blob:none) canonical in the target
repo instead of here. Refuses to clobber an existing checkout.

Fold the two cheatsheet fragments into git/worktree/clone: the one
command plus the manual recipe it encodes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
alycda added a commit that referenced this pull request Aug 4, 2026
…71)

Lifts tools/claude/skills/{jujutsu,jj-extract-gitignores} off the
stalled live-config branch (#39) into tools/agents/skills/ - the
cross-tool layout from #40 - and wires both into agent-skills.nix
alongside html-deck. #39 is the only open PR carrying jujutsu skills;
#54's jj content is AGENTS.md prose and #63's is cheatsheets.

Two things changed in the move rather than being copied verbatim:

The three jujutsu reference docs now live in references/. #39 stored
them flat while SKILL.md linked to references/*.md, so every
progressive-disclosure link was dead as authored - the same class of
bug as the html-deck template path fixed in #67.

The skills were pinned to jj v0.36; this environment runs 0.43.0.
Copying as-is would have shipped a skill recommending flags that no
longer exist. Every version-sensitive claim was re-verified against the
installed jj --help:

- jj git push --allow-new is gone -> --named <name>=<rev> (auto-tracks)
- jj describe --edit is gone; --editor survives with a different
  meaning (a modifier on --stdin/--message, not "open the editor")
- remotes.<name>.auto-track-bookmarks is not a real key in 0.43, so the
  documented migration target for two deprecated git.* keys was a no-op
- jj bookmark advance is new, but nothing advances on its own, so the
  "bookmarks aren't branches" rule stands rather than being contradicted

Still accurate and left alone: -o/--onto canonical with -d aliased,
squash --from/--into unrenamed, push -b/--change valid, and file
untrack still requiring pre-ignored paths (upstream #5225 still open,
so the Rule 2 workaround survives).

#39's clean-git-history skill is deliberately left behind: it sits next
to these two but is pure git, Ditto-SDK-specific, and malformed.

Verified: statix, deadnix --fail, and nix flake check --all-systems
clean; homeConfigurations."alyssa@dev".activationPackage builds and all
five files materialize under ~/.claude/skills/ with references/ intact.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

⊕ Entity-level changes

home-manager/modules/common.nix

Status Type Name
Δ binding imports

home-manager/modules/tools/git-worktree-clone.nix

Status Type Name
+ orphan module-level
+ binding home.packages
+ orphan module-level

tools/cheat/cheatsheets/community/git/worktree/clone

Status Type Name
+ chunk lines 1-11

tools/cheat/cheatsheets/community/git/worktree/fetch

Status Type Name
- chunk lines 1-1

tools/cheat/cheatsheets/community/git/worktree/gitdir

Status Type Name
- chunk lines 1-1

tools/git/git-worktree-clone.sh

Status Type Name
+ orphan module-level
+ function usage
+ orphan module-level

Summary: 7 added, 1 modified, 2 deleted across 6 files (4 added orphans)

functions and classes, not lines · sem

@alycda

alycda commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants