Post

HN
Hacker News

Claude Code runs Git reset –hard origin/main against project repo every 10 mins

Claude Code performs git fetch origin + git reset --hard origin/main on the user's project repo every 10 minutes via programmatic git operations (no external git binary spawned). This silently destroys all uncommitted changes to tracked files. Untracked files survive. Git worktrees are immune.

1. Git reflog: 95+ entries at exact 10-minute intervals

The second offset is consistent within each session but varies between sessions ( :08 , :36 , :41 , :09 ), confirming a timer tied to session start time with a 600-second interval. 95+ entries observed across 4 sessions over ~36 hours.

At the exact reset time, fswatch on .git/ captured:

This is the classic pattern for git fetch origin + git reset --hard origin/main .

4. Only the Claude Code process is a candidate