Coder Social home page Coder Social logo

lexmin0412 / git-config-manager Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 0.0 144 KB

Git Config Manager, Git 用户配置管理工具,用于在不同工作区(目录) 灵活切换不同的 Git 配置,降低心智负担。

Home Page: https://github.com/lexmin0412/gcm

JavaScript 0.28% TypeScript 99.72%
cli git tools git-config

git-config-manager's Introduction

GCM

git 用户配置管理工具。

version workflow licence downloads-month

目录

简介

GCM, 全称 Git Config Manager,用于在不同工作区(目录) 灵活切换不同的 Git 配置,降低心智负担。

开发这个工具的初衷,是因为我的设备既用于公司项目开发,平时也会写一些自己的项目,我需要频繁不断地在不同 Git 账号之间切换以确保我使用正确的用户来进行提交,一次次的 git config user.name xxxgit config user.name [email protected] 耗费了我大量的时间,每次手动输入也难免会产生差错,造成一些未知用户的提交。于是我下定决心要开发这个工具,它可以帮你实现如下需求:

  • 全局维护多个 Git 用户配置,在需要时可以方便地切换
  • 快速查询当前目录应用的 Git 用户配置
  • 扫描某个目录下存在多少份不同的 Git 用户配置,然后快速纠正它

查看 功能 部分来了解它所有的 API,如果你有什么意见或建议,也欢迎通过 issue 来进行交流。

安装

npm install @lexmin0412/gcm -g

功能

说明:

如果本机已有 gcm 命令,可以使用 gitconf 命令来替换,如 gcm list 可以改为 gitconf list,其他命令同理。

gcm list

简写:gcm ls

查看所有用户配置。

gcm add

添加用户配置,需要输入别名、用户、邮箱信息。

gcm use <alias>

通过别名切换用户配置。

gcm remove

简写:gcm rm

通过别名删除用户配置。

gcm current

注:v1.1.0 以上版本支持。

简写:gcm cur

显示当前用户正在使用的配置。

gcm scan

注:v1.2.0 以上版本支持。

简写:gcm sc

扫描指定目录(默认当前用户目录)下的所有用户配置。

gcm doctor

注:v1.3.0 以上版本支持。

诊断当前目录下使用的 git 配置是否正确。

gcm upgrade

注:v1.4.0 以上版本支持。

更新全局 gcm 到 latest 版本。

更新日志

点我 前往。

git-config-manager's People

Contributors

lexmin0412 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

git-config-manager's Issues

开发计划:VSCode插件支持

Clear and concise description of the problem

目前遇到以下问题:

  1. 必须要打开终端才能知道自己的配置
  2. 只能在命令行切换配置,有心理包袱
  3. 全局命令gcm可能被占用,即便提供了gitconf也仍然存在冲突的可能

Suggested solution

如果能够支持 vscode 插件,可以解决以下问题:

  • 不用打开终端就切换到对应的配置,也能方便地看到当前使用配置;
  • 规避全局命令被占用的问题

Alternative

No response

Additional context

No response

Validations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.