MCPcopy Index your code
hub / github.com/9999years/git-prole

github.com/9999years/git-prole @v0.5.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.3 ↗ · + Follow
491 symbols 2,146 edges 107 files 58 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

git-prole

Crates.io

Packaging status

User manual

A git-worktree(1) manager.

A normal Git checkout looks like this:

my-repo/
  .git/
  README.md
  ...

Worktrees allow you to associate multiple checkouts with one .git directory, like this:

my-repo/
  .git/      # A bare repository
  main/      # A checkout for the main branch
    README.md
  feature1/  # A checkout for work on a feature
    README.md
  ...

This makes it a lot easier to keep a handful of branches 'in flight' at the same time, and it's often handy to be able to compare your work against a local checkout of the main branch without switching branches.

Unfortunately, the built-in git worktree commands don't make it very easy to set up repositories with this layout. git-prole exists to paper over these deficiencies.

Features

  • Clone a repository into a worktree checkout with git prole clone URL [DESTINATION].

  • Convert an existing repository into a worktree checkout with git prole convert.

  • Add a new worktree with git prole add.

  • git prole add feature1 will create a feature1 directory next to the rest of your worktrees; git worktree add feature1, in contrast, will create a feature1 subdirectory nested under the current worktree.

  • Branches created with git prole add will start at and track the repository's main branch by default.

  • git prole add will copy untracked files to the new worktree by default, making it easy to start a new worktree with a warm build cache.

  • git prole add can run commands when a new worktree is created, so that you can warm up caches by running a command like direnv allow.

  • git prole add can perform regex substitutions on branch names to compute a directory name, so that you can run git prole add -b myname/team-1234-my-ticket-with-a-very-long-title and get a directory name like my-ticket.

  • git prole add respects the -c/--create option (to match git switch); git worktree add only allows -b (with no long-form option available).

Extension points exported contracts — how you extend this code

Utf8Absolutize (Interface)
Like [`Absolutize`] but for [`camino`] paths. [2 implementers]
src/utf8absolutize.rs
PathDisplay (Interface)
A way to display a path "nicely". [1 implementers]
src/path_display.rs
GitLike (Interface)
(no doc) [2 implementers]
src/git/git_like.rs

Core symbols most depended-on inside this repo

branch
called by 119
test-harness/src/repo_state.rs
args
called by 71
src/git/mod.rs
cd_cmd
called by 62
test-harness/src/lib.rs
repo_state
called by 62
test-harness/src/lib.rs
worktrees
called by 62
test-harness/src/repo_state.rs
assert
called by 62
test-harness/src/repo_state.rs
arg
called by 47
src/git/mod.rs
sh
called by 46
test-harness/src/lib.rs

Shape

Method 279
Function 152
Class 45
Enum 12
Interface 3

Languages

Rust100%

Modules by API surface

src/git/worktree/parse.rs30 symbols
test-harness/src/repo_state.rs25 symbols
src/git/worktree/resolve_unique_names.rs24 symbols
src/config.rs21 symbols
src/git/status.rs20 symbols
src/convert.rs20 symbols
src/git/worktree/mod.rs19 symbols
src/git/refs/remote_branch.rs18 symbols
src/git/mod.rs18 symbols
src/add.rs17 symbols
src/git/refs/local_branch.rs16 symbols
src/git/remote.rs15 symbols

For agents

$ claude mcp add git-prole \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact