Breakthrough Method for Agile Ai Driven Development
fix: resolve default branch explicitly when updating shallow-cloned custom modules (#2332)
With shallow clones (--depth 1), `origin/HEAD` becomes stale after the initial clone. The update path used `git reset --hard origin/HEAD` which never picked up new commits pushed to the default branch. Resolve the default branch name via `git symbolic-ref refs/remotes/origin/HEAD`, then fetch and reset against `origin/<branch>` explicitly. Falls back to `main` if origin/HEAD is not set. Co-authored-by: Brian <bmadcode@gmail.com>
J
Jérôme Revillard committed
9c291b7ca9e834122e35164de50cc478b2457396
Parent: fea431f
Committed by GitHub <noreply@github.com>
on 5/25/2026, 7:05:59 PM