Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/9999years/git-prole
A git-worktree(1) manager
https://github.com/9999years/git-prole
git git-worktree
Last synced: about 2 months ago
JSON representation
A git-worktree(1) manager
- Host: GitHub
- URL: https://github.com/9999years/git-prole
- Owner: 9999years
- Created: 2024-09-13T21:24:05.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-22T20:42:11.000Z (3 months ago)
- Last Synced: 2024-10-23T07:39:12.956Z (3 months ago)
- Topics: git, git-worktree
- Language: Rust
- Homepage: https://9999years.github.io/git-prole/
- Size: 290 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-prole
A [`git-worktree(1)`][git-worktree] manager.
[git-worktree]: https://git-scm.com/docs/git-worktree
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).