Open a branch in a second worktree
Check out a branch in a separate directory and keep your current branch as is
git worktree add ../hotfix-branch hotfix/urgent
More git commands
-
git rebase -i HEAD~5Squash, reorder or edit the last 5 commits
-
git cherry-pick abc1234Apply one specific commit from another branch
-
git stash push -m "WIP: feature X"Save your current changes to the stash with a clear message
-
git stash listShow all stashed sets of changes
-
git stash apply stash@{2}Apply a specific stash entry and keep it in the list