Coder Social home page Coder Social logo

yankeexe / git-worktree-switcher Goto Github PK

View Code? Open in Web Editor NEW
125.0 3.0 19.0 17 KB

Switch between git worktrees with speed. :zap:

License: MIT License

Shell 100.00%
git worktree cli cli-app shell shell-script linux workflow-management workflow-tool bash

git-worktree-switcher's Introduction

Git worktree switcher:zap:

Switch between git worktrees with speed. ⚡

demo of switching between git worktrees

Installation

Download the script from the Release section.

Make the script executable.

$ chmod +x wt

Copy the executable to any directory in your $PATH

$ sudo cp wt /usr/local/bin

Tab Autocompletion ⚡

For Bash

sudo cp completions/wt_completion /etc/bash_completion.d

For ZSH

Note: completion file for zsh has _ prefix

Find paths where you can store your completion

print -rl -- $fpath

Copy completion script to one of that location and restart the shell.

sudo cp completions/_wt_completion <one-of-$fpath>

exec zsh

For Fish

cp completions/wt.fish ~/.config/fish/completions

Tab autocompletion works for switching between your worktrees.

wt <TAB> <TAB>

# OR

wt <completion-characters> <TAB>

Usage

Switch between worktrees. You can do a text search to change to the worktree directory.

$ wt <worktree-name/search-term>

Go to root worktree directory

$ wt -

List out all the worktrees.

$ wt list

Show help message

$ wt help

Update to the latest release

$ wt update

Show the CLI version

$ wt version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.