ghwikipp: build_categories: make sure we're on main to start.

From d04ba2a8bfb8980dc06023b2276edea841519480 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 1 Oct 2026 11:19:23 -0400
Subject: [PATCH] build_categories: make sure we're on main to start.

---
 build_categories.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/build_categories.php b/build_categories.php
index 3d1d78c..5d0c2a4 100755
--- a/build_categories.php
+++ b/build_categories.php
@@ -364,6 +364,8 @@ function handle_subdir($dname)
     exit(1);
 }
 
+system("cd $escrawdata && git clean -dfq && git checkout -- . && git checkout main");
+
 handle_subdir($raw_data);  // get the root directory.
 
 $subdirs = array();