Update 跨平台代码同步.md

This commit is contained in:
yystopf 2024-05-15 11:29:12 +08:00
parent 812eb4c01c
commit 7aed342602
1 changed files with 4 additions and 4 deletions

View File

@ -24,13 +24,13 @@ sidebar_position: 2
Github配置方式为个人头像→Settings→Developer Settings→Personal access tokens (classic)→Generate new token→勾选repo按钮→保存
Github配置方式为个人头像→设置→私人令牌→生成新令牌→勾选projects权限→提交
![4.配置同步仓库](../../static/img/reposyncer/4.配置同步仓库.png)
![4.配置同步仓库](../../static/img/reposyncer/4.配置同步仓库.jpg)
3、在首次创建同步仓库时需要用户手动在目标仓库的代码库创建一条webhook用于监听仓库push事件从而向其他同步仓库推送代码完成同步同步步骤如下
①点击“复制链接”按钮复制平台用于接收webhook请求的地址
![5.配置webhook](../../static/img/reposyncer/5.配置webhook.png)
![5.配置webhook](../../static/img/reposyncer/5.配置webhook.jpg)
②访问点击前往按钮前往目标仓库webhook页新建一个webhook以github为例
@ -43,11 +43,11 @@ Github配置方式为个人头像→设置→私人令牌→生成新令牌
4、完成仓库配置绑定后需要绑定这两个仓库的指定同步分支建立首次同步方向。<font color="red">注:首次同步的策略为单向代码强推,请谨慎选择同步方向开启同步以避免代码被覆盖</font>
![8.绑定分支](../../static/img/reposyncer/8.绑定分支.png)
![8.绑定分支](../../static/img/reposyncer/8.绑定分支.jpg)
5、完成分支的绑定在绑定后会根据选择的同步方向立即执行一次同步。后续webhook监听到任意分支有代码推送会实时向另一个绑定分支同步代码推送代码
![9.确认绑定](../../static/img/reposyncer/9.确认绑定.png)
![9.确认绑定](../../static/img/reposyncer/9.确认绑定.jpg)
### 管理同步分支