Skip to content

Instantly share code, notes, and snippets.

@asears
Created January 5, 2025 14:56
Show Gist options
  • Save asears/d2f4ac7025a05e68492677a7533ec2ee to your computer and use it in GitHub Desktop.
Save asears/d2f4ac7025a05e68492677a7533ec2ee to your computer and use it in GitHub Desktop.
Git - Using worktrees

Git Worktree

  • Alternative to git stash save -m "mywip"
  • Alternative to cloning the repo again
  • 'clone' a worktree tracked folder
git worktree add -b feature/mybranch ../myfolder main
git worktree add ../myfolder main
git worktree list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment