Skip to content

fix(#1073): 修复GitHub文件夹同步会覆盖仓库其他目录的问题#1086

Merged
codexu merged 1 commit intocodexu:devfrom
LevisBale0824:fix/1073
May 11, 2026
Merged

fix(#1073): 修复GitHub文件夹同步会覆盖仓库其他目录的问题#1086
codexu merged 1 commit intocodexu:devfrom
LevisBale0824:fix/1073

Conversation

@LevisBale0824
Copy link
Copy Markdown
Contributor

  • 新增 GithubCreateTreePayload 接口,支持基于 base_tree 创建 tree
  • 修改同步逻辑:先获取当前 commit 和 base tree sha
  • 创建 tree 时使用 base_tree 参数,只覆盖本次同步的文件
  • 将强制推送从 force: true 改为 force: false

修复前:GitHub 同步会覆盖整个仓库的所有文件
修复后:只覆盖本次同步涉及的文件,不影响其他目录

Fixes #1073

- 新增 GithubCreateTreePayload 接口,支持基于 base_tree 创建 tree
- 修改同步逻辑:先获取当前 commit 和 base tree sha
- 创建 tree 时使用 base_tree 参数,只覆盖本次同步的文件
- 将强制推送从 force: true 改为 force: false

修复前:GitHub 同步会覆盖整个仓库的所有文件
修复后:只覆盖本次同步涉及的文件,不影响其他目录

Fixes codexu#1073
@codexu codexu merged commit 861aeed into codexu:dev May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] 在左侧边栏中右键点击同步文件夹时,在git仓库中删除了其他文件

2 participants