{"id":20082645,"url":"https://github.com/lexmin0412/git-config-manager","last_synced_at":"2025-08-27T01:48:07.294Z","repository":{"id":53254910,"uuid":"520583503","full_name":"lexmin0412/git-config-manager","owner":"lexmin0412","description":"Git Config Manager, Git 用户配置管理工具，用于在不同工作区(目录) 灵活切换不同的 Git 配置，降低心智负担。","archived":false,"fork":false,"pushed_at":"2025-02-20T14:01:18.000Z","size":695,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T21:57:12.730Z","etag":null,"topics":["cli","gcm","git","git-config","tools"],"latest_commit_sha":null,"homepage":"https://github.com/lexmin0412/gcm","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lexmin0412.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-08-02T17:07:03.000Z","updated_at":"2025-04-01T06:12:36.000Z","dependencies_parsed_at":"2025-05-06T01:34:30.446Z","dependency_job_id":"eb0a53d1-e7b2-4e3b-b0ef-0111443380c5","html_url":"https://github.com/lexmin0412/git-config-manager","commit_stats":{"total_commits":80,"total_committers":1,"mean_commits":80.0,"dds":0.0,"last_synced_commit":"6adeb3fe75c5cb888c975ac9cc0d9d6ad03141dc"},"previous_names":["lexmin0412/git-config-manager","lexmin0412/gcm"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/lexmin0412/git-config-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Fgit-config-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Fgit-config-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Fgit-config-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Fgit-config-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexmin0412","download_url":"https://codeload.github.com/lexmin0412/git-config-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Fgit-config-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272277722,"owners_count":24905551,"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-08-26T02:00:07.904Z","response_time":60,"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":["cli","gcm","git","git-config","tools"],"created_at":"2024-11-13T15:44:21.900Z","updated_at":"2025-08-27T01:48:07.230Z","avatar_url":"https://github.com/lexmin0412.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCM\n\ngit 用户配置管理工具。\n\n![version](https://img.shields.io/npm/v/@lexmin0412/gcm) ![NPM Last Update](https://img.shields.io/npm/last-update/@lexmin0412/gcm) ![NPM Downloads](https://img.shields.io/npm/dm/@lexmin0412/gcm) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/lexmin0412/git-config-manager)\n\n![Repo Beats](https://repobeats.axiom.co/api/embed/7b1fdf8c60db6bc080c1086aeb519fbc19531717.svg \"Repobeats analytics image\")\n\n## 目录\n\n- [简介](#简介)\n- [安装](#安装)\n- [功能](#功能)\n\n## 简介\n\nGCM, 全称 Git Config Manager，用于在不同工作区(目录) 灵活切换不同的 Git 配置，降低心智负担。\n\n开发这个工具的初衷，是因为我的设备既用于公司项目开发，平时也会写一些自己的项目，我需要频繁不断地在不同 Git 账号之间切换以确保我使用正确的用户来进行提交，一次次的 `git config user.name xxx`，`git config user.name xxx@xxx.com` 耗费了我大量的时间，每次手动输入也难免会产生差错，造成一些未知用户的提交。于是我下定决心要开发这个工具，它可以帮你实现如下需求：\n\n- 全局维护多个 Git 用户配置，在需要时可以方便地切换\n- 快速查询当前目录应用的 Git 用户配置\n- 扫描某个目录下存在多少份不同的 Git 用户配置，然后快速纠正它\n\n查看 [功能](#功能) 部分来了解它所有的 API，如果你有什么意见或建议，也欢迎通过 [issue](https://github.com/lexmin0412/gcm/issues) 来进行交流。\n\n## 安装\n\n```shell\nnpm install @lexmin0412/gcm -g\n```\n\n## 功能\n\n**说明：**\n\u003e 如果本机已有 gcm 命令，可以使用 `gitconf` 命令来替换，如 `gcm list` 可以改为 `gitconf list`，其他命令同理。\n\n### `gcm list`\n\n简写：`gcm ls`。\n\n查看所有用户配置。\n\n### `gcm add`\n\n添加用户配置，需要输入别名、用户、邮箱信息。\n\n### `gcm use \u003calias\u003e`\n\n通过别名切换用户配置。\n\n### `gcm remove`\n\n简写：`gcm rm`。\n\n通过别名删除用户配置。\n\n### `gcm current`\n\n\u003e 注：v1.1.0 以上版本支持。\n\n简写：`gcm cur`。\n\n显示当前用户正在使用的配置。\n\n### `gcm scan`\n\n\u003e 注：v1.2.0 以上版本支持。\n\n简写：`gcm sc`。\n\n扫描指定目录（默认当前用户目录）下的所有用户配置。\n\n### `gcm doctor`\n\n\u003e 注：v1.3.0 以上版本支持。\n\n诊断当前目录下使用的 git 配置是否正确。\n\n### `gcm upgrade`\n\n\u003e 注：v1.4.0 以上版本支持。\n\n更新全局 `gcm` 到 latest 版本。\n\n### `gcm sync`\n\n\u003e 注：v1.8.0 以上版本支持。\n\n同步 GCM 配置到远程仓库。\n\n### `gcm get-config`\n\n\u003e 注：v1.8.0 以上版本支持。\n\n获取 GCM 的同步配置。\n\n### `gcm set-config`\n\n\u003e 注：v1.8.0 以上版本支持。\n\n修改 GCM 的同步配置。\n\n\n## 更新日志\n\n[点我](https://github.com/lexmin0412/gcm/releases) 前往。\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=lexmin0412/git-config-manager\u0026type=Date)](https://star-history.com/#lexmin0412/git-config-manager\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmin0412%2Fgit-config-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexmin0412%2Fgit-config-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmin0412%2Fgit-config-manager/lists"}