AI Help

How do I work on two coding tasks at once without mixing their Git changes?

Give each coding task a separate Git worktree and branch, then verify its working directory and base commit.

Steps to follow

  1. Start from a known clean commit and create one worktree per task using supported Git or app controls.
  2. Check branch, path and git status inside each worktree before editing. Keep generated files and local services scoped appropriately.
  3. Review and test each task's diff independently before integrating its commits. Worktrees share repository history but have separate working files.

Example in practice

Illustrative example. A checkout for a search fix and another for a pricing page can proceed independently on separate branches.

Related AI help

Official guidance

OpenAI documentation