simpleGit(directory, { progress({ method, stage, progress }) { console.log(`git.${method} ${stage} stage ${progress}% complete`); }, }) .add('./*') .commit(`feat: 发布${title}`) .push(['-u', 'origin', 'main'], () => console.log('done'));; new Notice("Published successfully"); 常见问题 replace “node:events” with ‘events’ 扩展阅读 基于node 实现git clone拉取远程仓库代码 simple-git 简单易用的 Node.js Git库