Auto Upload Agent commited on
Commit
9460178
·
1 Parent(s): faea13d

v0: 啟動器骨架 + 量測工具(未驗證)

Browse files
Files changed (1) hide show
  1. sync.sh +5 -3
sync.sh CHANGED
@@ -74,10 +74,12 @@ if git diff --cached --quiet; then
74
  echo "[sync] 沒有改動,不用上傳"
75
  else
76
  git commit -q -m "$MSG" || { echo "[sync] commit 失敗"; exit 1; }
77
- # 第一次推送時遠端還沒有 main,要帶 -u 並允許無關歷史
78
- git push -u origin main 2>&1 | tail -3 \
79
- || git push -u --force origin main 2>&1 | tail -3
80
  fi
81
 
 
 
 
 
 
82
  echo "[sync] 完成:$(git log --oneline -1)"
83
  echo "[sync] https://huggingface.co/${STORAGE_REPO}"
 
74
  echo "[sync] 沒有改動,不用上傳"
75
  else
76
  git commit -q -m "$MSG" || { echo "[sync] commit 失敗"; exit 1; }
 
 
 
77
  fi
78
 
79
+ # 即使沒有新 commit 也要推 —— 這是「成果已保存」的保險,不能跳過。
80
+ # 第一次推送時遠端還沒有 main,要帶 -u。
81
+ git push -u origin main 2>&1 | tail -3 \
82
+ || git push -u --force origin main 2>&1 | tail -3
83
+
84
  echo "[sync] 完成:$(git log --oneline -1)"
85
  echo "[sync] https://huggingface.co/${STORAGE_REPO}"