alexiszamanidis / vscode-git-worktrees

A VS Code extension that wraps git worktree operations for simplicity and productivity
https://marketplace.visualstudio.com/items?itemName=GitWorktrees.git-worktrees
MIT License
44 stars 5 forks source link
git git-worktree typescript vscode-extension worktrees yarn

VS Code Git Worktrees

A Wrapper for Git Worktree Operations that provides an interactive API so developers can have a better experience.

Purpose of the extension

After creating a ZSH plugin that was responsible for wrapping up my daily git operations(zsh-git-fzf), I found myself very often switching between the terminal and my main Editor(VS Code). So I decided to create an extension for my main Editor that would help me avoid switching between them and keep everything in one tool.

Requirements

Multiple Workspaces

This project supports multiple workspaces, allowing users to organize and manage their projects in separate spaces. If you have opened more than one project, you will be asked to select the workspace in which you want to run the operation. If you have only one project opened, it will be selected as the default workspace.

To select a workspace, simply choose from the list of available workspaces when prompted. Once you've made your selection, the operation will be executed within the chosen workspace.

Supported operations

Getting started

Steps:

Features/Operations/Error

worktree-add

worktree-list

Worktree remove

error

Properties

Property Type Default value Description
vsCodeGitWorktrees.remove.stalledBranches boolean false Removes local(stalled) branches that do not exist on remote
vsCodeGitWorktrees.move.openNewVscodeWindow boolean true Open new vscode window when you switch or create a worktree
vsCodeGitWorktrees.worktrees.dir.path string null Define a directory for all worktrees between your projects
vsCodeGitWorktrees.add.autoPush boolean true Auto push worktree branch after its creation
vsCodeGitWorktrees.add.autoPull boolean true Auto pull worktree branch after its creation

Contribution

Run the Extension locally

# install dependencies
yarn
# compile code and watch input files
yarn watch
# Then, inside the editor, press F5. This will
# compile and run the extension in a new Extension
# Development Host window.

License

MIT © Alexis Zamanidis