mirror of
https://github.com/codexu/note-gen.git
synced 2026-04-25 21:05:55 +03:00
[GH-ISSUE #799] [feat] Feature: 支持将当前工作区所有笔记一键同步到远程 Git 仓库 #594
Labels
No labels
bug
duplicate
feature
platform: Android
platform: Linux
platform: Windows
platform: iOS
platform: macOS
priority: high
priority: low
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/note-gen#594
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xianggau on GitHub (Dec 17, 2025).
Original GitHub issue: https://github.com/codexu/note-gen/issues/799
描述你的建议
功能需求概述
当前 NoteGen 在使用 Git / Gitea 等作为同步后端时,文章(Markdown)同步是以单篇为粒度的:
对于已经存在于本地工作区里的大量 Markdown 文件,想要「第一次全部上传到远程同步仓库」时,需要一篇一篇手动触发同步,操作成本比较高。
希望增加一个「一键上传当前工作区所有笔记到远程 Git 仓库」的功能,用于首次迁移 / 批量补齐远程数据。
当前行为(Current Behavior)
以 Gitea 为例(其他 Git 平台逻辑类似):
primaryBackupMethod = gitea.data/tags.json).settings/store.json或.data/settings.json)core/article/custom-footer/sync.tsx中是「按当前activeFilePath同步」:结果是:
期望行为(Expected Behavior)
希望增加一个批量文章同步能力,例如:
activeFilePath列表,或工作区内的.md文件)。primaryBackupMethod(Github/Gitee/Gitlab/Gitea):sha进行更新。这样可以方便用户在以下场景中使用:
可能的实现思路(Suggestions)
仅作为参考,具体以项目设计为准:
core/article/custom-footer/sync.tsx中单篇同步的实现:activeFilePath进行循环调用;primaryBackupMethod自动选择对应的上传函数:uploadGithubFileuploadGiteeFileuploadGitlabFileuploadGiteaFile环境信息(Environment)
@codexu commented on GitHub (Jan 19, 2026):
现在可以在文件夹右键点击同步进行整个文件夹的同步