Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-repo-sync-cli: 一个同步所有 fork 仓库的 CLI 工具 #22

Open
hexh250786313 opened this issue May 26, 2022 · 0 comments
Open
Labels
post blog post type: POST

Comments

@hexh250786313
Copy link
Owner

hexh250786313 commented May 26, 2022

不要点开, 博客网站用的
博文置顶说明
一个可以同时运行多个 "gh repo sync owner/cli-fork" 命令的命令行工具, 以帮助同步所有 fork 的 GitHub 仓库

关于

Required

确保环境中已经安装了 github-cli 并且已经登录了 github 帐号

安装

注意是 gh-repo-sync-cli, 而不是 gh-repo-cli!!! 因为已经有另一个名为 gh-repo-sync 的库了 🤷‍♀

npm install -g gh-repo-sync-cli

使用

gh-repo-sync --help

该工具有两种方法来传递仓库名参数给 gh repo sync

通过命令行

gh-repo-sync owner/repo1 owner/repo2

通过配置文件

配置文件位置: ~/.config/gh-repo-sync/config.json

{
  "repos": [
    "owner/repo1",
    "owner/repo2"
  ]
}

配置完后执行 gh-repo-sync 就会同步所有 repos 数组中的仓库

如果同步过程中有源仓库发生了变化需要进行 PR, 那么工具就会抛出错误

截图

2022-05-25_20-26

@hexh250786313 hexh250786313 added the post blog post type: POST label May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
post blog post type: POST
Projects
None yet
Development

No branches or pull requests

1 participant