@sc-cli/grm

0.1.5 • Public • Published

概述

本工具供项目快速切换git仓库使用,支持多个push地址。

使用指南

快速入手

  • 安装 npm i @sc-cli/grm -g

  • 绑定待切换Git仓库地址 grm bind git@xxx

  • 切换至绑定仓库地址 grm use bind

仓库统一地址切换

  • 添加待切换Git仓库统一地址 grm add <name> <host> -g [group] -p [protocol]

  • 切换至当前项目对应统一地址仓库 grm use <name>

注意:如果未指定分组group和协议protocol参数,切换时自动使用当前项目的group和protocol。

命令说明

使用grm或sc-grm作为命令。

add

添加待切换Git仓库统一地址

grm add <name> <host> -g [group] -p [protocol]

del

删除待切换Git仓库统一地址

grm del <name>

bind

绑定当前项目待切换Git仓库地址

绑定默认地址

grm bind <url>

绑定指定名称地址

grm bind <name> <url>

unbind

解绑当前项目待切换Git仓库地址

grm unbind [name]

use

切换至已添加或绑定的Git仓库地址

切换单个地址

grm use <name>

切换绑定地址

grm use bind or grm use bind:xxx

切换多个地址

grm use origin,bind,xxx

clone

clone项目,支持url和仓库地址+项目名两种方式

clone项目地址

grm clone <gitUrl>

clone仓库地址+项目名

grm clone <name> <projectName>

ls

列出已添加或绑定的待切换Git仓库地址信息

grm ls

Readme

Keywords

Package Sidebar

Install

npm i @sc-cli/grm

Weekly Downloads

2

Version

0.1.5

License

MIT

Unpacked Size

39.8 kB

Total Files

33

Last publish

Collaborators

  • zhongshihao