{"id":15502764,"url":"https://github.com/j-siu/go-mygit","last_synced_at":"2026-04-01T23:57:33.526Z","repository":{"id":57695196,"uuid":"488816998","full_name":"J-Siu/go-mygit","owner":"J-Siu","description":"Git, Github repository command line tool supporting group action and mass directory processing with parallel push.","archived":false,"fork":false,"pushed_at":"2025-12-11T22:59:44.000Z","size":267,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T03:06:12.585Z","etag":null,"topics":["api","git","gitea","github","go","golang","parallel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/J-Siu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-05T03:19:24.000Z","updated_at":"2025-12-11T22:59:48.000Z","dependencies_parsed_at":"2024-06-20T04:41:37.967Z","dependency_job_id":"767c0ce2-fcb9-4c96-af08-f090edbfff08","html_url":"https://github.com/J-Siu/go-mygit","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/J-Siu/go-mygit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-mygit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-mygit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-mygit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-mygit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J-Siu","download_url":"https://codeload.github.com/J-Siu/go-mygit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fgo-mygit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27706980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","git","gitea","github","go","golang","parallel"],"created_at":"2024-10-02T09:10:59.133Z","updated_at":"2025-12-13T14:25:52.842Z","avatar_url":"https://github.com/J-Siu.png","language":"Go","funding_links":["https://www.paypal.com/donate/?business=HZF49NM9D35SJ\u0026no_recurring=0\u0026currency_code=CAD"],"categories":[],"sub_categories":[],"readme":"# go-MyGit [![Paypal donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?business=HZF49NM9D35SJ\u0026no_recurring=0\u0026currency_code=CAD)\n\nCommand line tool for easy mass configuration of git remotes, and working with Github/Gites repositories API.\n\n### Table Of Content\n\n- [Install](#install)\n- [Supported Platforms](#supported-platforms)\n- [Highlight](#highlight)\n  - [Push multiple repository](#push-multiple-repository)\n  - [Set Archived](#set-archived)\n  - [Set Private](#set-private)\n  - [Update Description](#update-description)\n  - [Update Topics](#update-topics)\n- [What It Does](#what-it-does)\n- [What It Does Not](#what-it-does-not)\n- [Features](#features)\n- [Usage](#usage)\n  - [Debug](#debug)\n  - [Selector](#selector)\n    - [-g/--group](#-g--group)\n    - [-r/--remote](#-r--remote)\n  - [Git Base Commands](#git-base-commands)\n    - [init](#init)\n    - [push](#push)\n      - [--tags](#--tags)\n      - [--all](#--all)\n- [Configuration](#configuration)\n- [Packages Used](#packages-used)\n- [Repository](#repository)\n- [Contributors](#contributors)\n- [License](#license)\n\n\u003c!--more--\u003e\n\n\u003e This replaces the bash implementation [mygit](https://github.com/J-Siu/mygit).\n\n### Install\n\nGo install\n\n```sh\ngo install github.com/J-Siu/go-mygit/v2@latest\n```\n\nDownload\n\n- https://github.com/J-Siu/go-mygit/releases\n\n### Supported Platforms\n\n- github\n- gitea\n- gogs(not tested)\n\n### Highlight\n\nFollowing are highlight of some `go-mygit` functions.\n\n#### Push multiple repository\n\n```sh\n# Push to all remotes\ngo-mygit push\n# Support path operation\ngo-mygit push docker_*\n```\n\n#### Set Archived\n\n```sh\n# Set archived to true\ngo-mygit repo set archived true\n# Set archived to false\ngo-mygit repo set archived false\n```\n\n#### Set Private\n\n```sh\n# Set current repository to private on server\ngo-mygit repo set private true\n# Support path operation\ngo-mygit repo set private false docker_*\n```\n\n#### Update Description\n\n```sh\n# Update description on server of current repository/directory\ngo-mygit repo set description \"This is a new description\"\n```\n\n#### Update Topics\n\n```sh\n# Update topics on server of current repository/directory\ngo-mygit repo set topic golang go project\n```\n\n### What It Does\n\n\u003e These are the reasons \"mygit\" got created.\n- Parallel processing multiple repository, eg. pushing 10 repos at the same time\n- Pushing same repo to multiple git servers which are not mirrored\n- Set up same set of git remote repeatedly\n- Update repository info on git server(api)\n\n### What It Does Not\n\n- Replace `git` command. (`git` command is required for git function to work.)\n- Replace Github cli `gh` (`go-mygit` only cover limited number of api in comparison.)\n\n### Features\n\n- Configuration File\n  - [x] remotes\n  - [x] groups\n  - [x] secrets\n- Selector for git servers\n  - [x] -g/--group\n  - [x] -r/--remote\n- Base(git) Commands\n  - [x] clone\n  - [x] init\n  - [x] pull\n  - [x] push\n  - [x] remote\n    - [x] add\n    - [x] list\n    - [x] remove\n- Repository(api)\n  - [x] list all repo on server\n  - [x] create repo on server\n  - [x] get / set\n    - [x] actions (enable/disable)\n    - [x] archived\n    - [x] description\n    - [x] discussions (enable/disable)\n    - [x] private\n    - [x] projects (enable/disable)\n    - [x] public key (get only)\n    - [x] secret\n    - [x] topic\n    - [x] visibility\n  - [x] delete\n    - [x] repository\n    - [x] secret\n\n### Usage\n\n```sh\nGit and Repo automation made easy.\n\nUsage:\n  go-mygit [command]\n\nAvailable Commands:\n  clone       Git clone\n  completion  Generate the autocompletion script for the specified shell\n  config      Print configurations\n  help        Help about any command\n  init        Git init and reset remotes\n  pull        Git pull\n  push        Git push\n  remote      Git remote commands\n  repository  Repository commands\n\nFlags:\n      --config string        config file (default is $HOME/.config/go-mygit.json)\n  -d, --debug                Enable debug\n  -g, --group stringArray    Specify group\n  -h, --help                 help for go-mygit\n      --no-parallel          Don't process in parallel\n      --no-skip              Don't skip empty output\n      --no-title             Don't print title for most output\n  -r, --remote stringArray   Specify remotes\n\nUse \"go-mygit [command] --help\" for more information about a command.\n```\n\n#### Debug\n\nUse `-d` for debug output.\n\nExample:\n\n```sh\ngo-mygit -d repo des get\n```\n\n#### Selector\n\n`go-mygit` allow command applied to groups or remotes through the use of `-g/--group` and `-r/--remote`. This applies to all commands except `remote` and `group` mentioned above.\n\n`-g/--group` and `-r/--remote` must be placed right after `mygit` and before any command.\n\n##### -g/--group\n\n```sh\ngo-mygit -g external \u003ccommand\u003e\ngo-mygit -g external -g internal \u003ccommand\u003e\n```\n\n##### -r/--remote\n\n```sh\ngo-mygit -r gh \u003ccommand\u003e\ngo-mygit -r gh -r server3 \u003ccommand\u003e\n```\n\n`-g/--group` and `-r/--remote` can be used at the same time.\n\n```sh\ngo-mygit -g external -r server2 \u003ccommand\u003e\n```\n\n#### Git Base Commands\n\n`init`, `push` are git base commands.\n\n##### init\n\n`go-mygit init` will clear all existing remote and add remote base on `-g`/`-r` selector. If no group nor remote are specified, all configured remotes will be added.\n\n`go-mygit init` by default use current directory name as repository name. Repository name can be specified in the format `go-mygit init \u003crepository\u003e`. File `.go-mygit.json` containing the repository name will be created, which is used by API based commands.\n\nBefore `go-mygit init`:\n\n```sh\n$ git remote -v\norigin  https://github.com/J-Siu/mygit.git (fetch)\norigin  https://github.com/J-Siu/mygit.git (push)\n```\n\n`go-mygit init` without selector:\n\n```sh\n$ go-mygit init\nReinitialized existing Git repository in /tmp/mygit/.git/\n\n$ git remote -v\ngh      git@github.com:/username1/mygit.git (fetch)\ngh      git@github.com:/username1/mygit.git (push)\nserver2 git@server2:/username2/mygit.git (fetch)\nserver2 git@server2:/username2/mygit.git (push)\nserver3 git@server3:/username3/mygit.git (fetch)\nserver3 git@server3:/username3/mygit.git (push)\n```\n\n`go-mygit init` with group internal:\n\n```sh\n$ go-mygit --group internal init\nReinitialized existing Git repository in /tmp/mygit/.git/\n\n$ git remote -v\nserver2 git@server2:/username2/mygit.git (fetch)\nserver2 git@server2:/username2/mygit.git (push)\nserver3 git@server3:/username3/mygit.git (fetch)\nserver3 git@server3:/username3/mygit.git (push)\n```\n\n`go-mygit init` with repository name:\n\n```sh\n$ go-mygit init mygit2\nReinitialized existing Git repository in /tmp/mygit/.git/\n\n$ git remote -v\ngh      git@github.com:/username1/mygit2.git (fetch)\ngh      git@github.com:/username1/mygit2.git (push)\nserver2 git@server2:/username2/mygit2.git (fetch)\nserver2 git@server2:/username2/mygit2.git (push)\nserver3 git@server3:/username3/mygit2.git (fetch)\nserver3 git@server3:/username3/mygit2.git (push)\n```\n\n##### push\n\n`go-mygit push` base on `-g`/`-r` selector. If no group nor remote are specified, all configured remotes will be pushed in sequence.\n\n```sh\ngo-mygit push\n```\n\n```sh\ngo-mygit -r gh push\n```\n\n`go-mygit push` support options `--tags` and `--all`\n\n###### --tags\n\nIf `--tags` is used, `go-mygit push` will push all tags.\n\n```sh\ngo-mygit push --tags\n```\n\n###### --all\n\nIf `--all` is used, `mygit push` will push all branches(`--all`).\n\n```sh\ngo-mygit -r gh push --all\n```\n\n### Configuration\n\nSee [go-mygit.json.md](go-mygit.json.md)\n\n### Packages Used\n\n- [go-gitapi](https://github.com/J-Siu/go-gitapi)\n- [go-helper/v2](https://github.com/J-Siu/go-helper)\n- [cobra](//github.com/spf13/cobra)\n- [viper](//github.com/spf13/viper)\n\n### Repository\n\n- [go-mygit](https://github.com/J-Siu/go-mygit)\n\n### Contributors\n\n- [John, Sing Dao, Siu](https://github.com/J-Siu)\n\n### License\n\nThe MIT License (MIT)\n\nCopyright © 2025 John, Sing Dao, Siu \u003cjohn.sd.siu@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-siu%2Fgo-mygit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-siu%2Fgo-mygit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-siu%2Fgo-mygit/lists"}