https://github.com/pfgray/worktreez
https://github.com/pfgray/worktreez
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pfgray/worktreez
- Owner: pfgray
- Created: 2021-11-25T18:15:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-05T15:56:43.000Z (over 3 years ago)
- Last Synced: 2025-01-25T06:26:16.152Z (4 months ago)
- Language: TypeScript
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
File structure:
You can use the `init` command to initialize a worktreez folder.
```
wt init [email protected]:pfgray/worktreez.git
```This will clone a bare version of the repository into a `.worktreez` directory, and create a worktree with the default branch in a `repo1` directory.
Inside a worktreez folder, you can use the `switch` command to switch to a different branch.
```
wt switch
```Worktreez will search up the directory tree, looking for a `.worktreez` folder, and use that to list the branches checked out.
The `switch` command can take an optional branch name to switch to. If the branch is not checked out in an existing worktree, you will be provided with a list of the worktrees that are checked out, and you can choose a branch to replace with the provided branch (provided there are no changes)