The worktree
sub command of git enable us to check out multiple branches, i.e. have multiple working trees at the same time.
This is really useful when I want to:
- Compare code from two branches in IDE instead of a GUI tool like smartgit.
- Perform a long running test on one branch and working on another branch.
See this github blog post and official documentation for reference.