Question · Vibe coding with Claude Code course · Module 15: Advanced Claude Code

Quiz: Rules before the start in a worktree

The deny rules and hooks from .claude/settings.json are not in a commit, and you run claude -p --worktree api-errors. What happens to them in this run?

Answer options

  • Claude Code will copy .claude/ into the worktree together with the files from .worktreeinclude
  • The worktree will use them from the main directory, because it shares the .git folder with it
  • The run will not start until you make a commit
  • They will not be there, because a worktree is a checkout of committed files and Claude Code reads .claude/settings.json from the session directory

You can check the correct answer by solving this task in the CodeWorlds game.