M5 repo open for push, add guide for M4

This commit is contained in:
M5
2026-05-08 00:41:39 +08:00
parent 23d114d058
commit 1c9c8f7d61

View File

@@ -0,0 +1,36 @@
# M5 git push 已開放
M5 端的 non-bare repo 已設定 `receive.denyCurrentBranch = ignore` + post-receive hookM4 可以直接 push 回 M5。
## M4 設定 origin
```bash
# 如果之前 clone 的,設定 remote
cd momentry_docs
git remote set-url origin accusys@192.168.110.201:/Users/accusys/momentry_core_0.1/.git
git pull
```
## 出門 demo 情境
當 M5 帶出門時M4 無法透過 SSH 連到 M5。兩種應對
1. **M4 開一個本地 branch等 M5 回來再 merge**
```bash
git checkout -b m4_offline
# 寫文件...
git add . && git commit -m "..."
```
2. **或之後設 GitHub remote**(建議,兩邊都可以獨立 push/pull
## 測試
M4 請試試:
```bash
echo "test from M4" > docs_v1.0/M4_workspace/_m4_test.txt
git add . && git commit -m "M4 test push"
git push
```
M5 會看到這份文件。