docs: switch cross-device handoff to master
This commit is contained in:
+11
-8
@@ -5,15 +5,14 @@
|
||||
|
||||
## 1. 获取正确分支
|
||||
|
||||
用户已要求将 `codex/new-deployment-architecture` 合并到本地 `master`,后续本地开发以 `master` 为准。
|
||||
**本次明确只合并本地,未推送 `origin/master`。其他设备目前仍需拉取远端工作分支;
|
||||
只有后续获准推送 master 后,才能从远端 master 获取这些成果。**
|
||||
新架构已从 `codex/new-deployment-architecture` 合并到 `master`,用户已手动推送源码,
|
||||
并授权提交、推送最新交接文档。**后续开发和跨设备接续统一使用 `master`。**
|
||||
先为新设备配置仓库 SSH 权限,并从可信渠道核对 Git 服务器主机指纹;不要禁用主机校验。
|
||||
|
||||
远端 master 尚未同步时:
|
||||
新设备克隆:
|
||||
|
||||
```sh
|
||||
git clone --branch codex/new-deployment-architecture --single-branch ssh://git@git.joywaygames.cn:2222/joywaygamess/server-deploy.git
|
||||
git clone --branch master --single-branch ssh://git@git.joywaygames.cn:2222/joywaygamess/server-deploy.git
|
||||
cd server-deploy
|
||||
git branch --show-current
|
||||
git log -1 --oneline
|
||||
@@ -25,12 +24,16 @@ git status --short
|
||||
```sh
|
||||
git status --short
|
||||
git fetch origin
|
||||
git switch codex/new-deployment-architecture
|
||||
git switch master
|
||||
git pull --ff-only
|
||||
```
|
||||
|
||||
若本地尚无该分支,用 `git switch --track origin/codex/new-deployment-architecture` 创建跟踪分支。
|
||||
master 获准推送后,上述命令中的分支名改为 `master`;用 `git log -1 --oneline` 核对交接提交。
|
||||
若此前用 `--single-branch` 只克隆了工作分支,先运行
|
||||
`git fetch origin refs/heads/master:refs/remotes/origin/master` 获取 master;
|
||||
本地尚无 master 时,用 `git switch -c master --no-track origin/master` 创建分支,
|
||||
再用 `git pull --ff-only origin master` 显式同步(避免旧单分支 fetch 配置影响跟踪关系)。
|
||||
普通完整克隆可使用 `git switch --track origin/master`。
|
||||
用 `git log -1 --oneline` 核对交接提交;旧工作分支只作历史参考。
|
||||
有冲突或远端分叉时停止核对,不强制覆盖。跨设备轮换前,显式提交并推送本轮需要带走的文件。
|
||||
聊天记录、本机临时文件和未提交修改不会随 Git 同步。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user