Skip to content
This repository has been archived by the owner on Feb 12, 2020. It is now read-only.

Latest commit

 

History

History
91 lines (77 loc) · 1.48 KB

README.md

File metadata and controls

91 lines (77 loc) · 1.48 KB

NOTE: This is no longer maintained! See this file for most recent version.

wt

utility for wrapping around git worktree, allowing easy navigation between trees

installation

$ git clone https://github.com/keggsmurph21/wt
$ cd wt
$ ./scripts/install
$ source ~/.bashrc

usage

see current worktrees
$ wt list
worktrees:
  - master
  - feature-123
  - testing
  - stable
$ wt list --all
worktrees:
  - master                0123456 /path/to/master
  - feature-123           7890abc ~/.worktrees/:owner/:repo/feature-123
  - testing               1234567 ~/.worktrees/:owner/:repo/testing
  - stable                890abcd ~/.worktrees/:owner/:repo/stable
jump to a specific worktree
$ pwd
/path/to/master
$ wt use testing
$ pwd
~/.worktrees/:owner/:repo/testing
add a new worktree (from an existing branch)
$ pwd
/path/to/master
$ git branch --list
* master
  testing
$ wt list
worktrees:
  - master
$ wt add testing
$ pwd
~/.worktrees/:owner/:repo/testing
$ wt list
worktrees:
  - master
  - testing
add a new worktree (and create a new branch) (coming soon)
$ pwd
/path/to/master
$ git branch --list
* master
  testing
$ wt list
worktrees:
  - master
$ wt add new-branch
$ pwd
~/.worktrees/:owner/:repo/new-branch
$ git branch --list
  master
  testing
* new-branch
$ wt list
worktrees:
  - master
  - testing
  - new-branch