Using Git Worktrees
Safe branch isolation
- Check
git status --shortand current branch. - If on
mainormaster, create a feature branch or worktree before edits. - Never discard uncommitted user changes.
- Keep commits atomic and named after the task or requirement.
Common commands:
git switch -c feature/<slug>
# or
git worktree add ../<repo>-<slug> -b feature/<slug>