File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 9595 TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
9696 git commit -m "Update searchindex files - ${TIMESTAMP}" --allow-empty
9797
98- # Force push to replace main branch (deletes history, keeps all files)
99- git push -f origin new-main:main
98+ # Force push to replace master branch (deletes history, keeps all files)
99+ git push -f origin new-main:master
100100
101101 echo "Successfully reset repository history and pushed all searchindex files"
102102
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ jobs:
201201 MAX_RETRIES=20
202202 RETRY_COUNT=0
203203 while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
204- if git push origin main ; then
204+ if git push origin master ; then
205205 echo "Successfully pushed on attempt $((RETRY_COUNT + 1))"
206206 break
207207 else
@@ -210,11 +210,11 @@ jobs:
210210 echo "Push failed, attempt $RETRY_COUNT/$MAX_RETRIES. Pulling and retrying..."
211211
212212 # Try normal rebase first
213- if git pull --rebase origin main 2>&1 | tee /tmp/pull_output.txt; then
213+ if git pull --rebase origin master 2>&1 | tee /tmp/pull_output.txt; then
214214 echo "Rebase successful, retrying push..."
215215 else
216216 # If rebase fails due to divergent histories (orphan branch reset), re-clone
217- if grep -q "unrelated histories\|refusing to merge\|fatal: invalid upstream" /tmp/pull_output.txt; then
217+ if grep -q "unrelated histories\|refusing to merge\|fatal: invalid upstream\|couldn't find remote ref " /tmp/pull_output.txt; then
218218 echo "Detected history rewrite, re-cloning repository..."
219219 cd /tmp
220220 rm -rf searchindex-repo
You can’t perform that action at this time.
0 commit comments