git-shortcut
git 命令行下快捷操作其它项目
git-shortcut helps you quickly run git commands work with multiple repos without switch directory
Installation
npm install -g git-shortcut
Usage
使用别名操作项目
g -s b ../blog # 添加别名 add alias g b status # 使用别名 use alias g b pullg ../static pull # 直接操作目录 g push # 如果没有别名匹配时, g 相当于 git 的别名 # work as a alias for git if no alias matched
-
,用于经常切换于两个 repo 之间时,操作相对应的另一个项目
使用特殊别名 -
, work on the related repo, and vice versa
special alias # cwd Main g -s - ../static # 添加`-'别名 g - status # cd ../staticg - st # show status of Main
同时操作多个项目
g -p - pull # pull current repo and alias `-' g -p b pull # pull current repo and alias `b' g -p -,b pull # pull current repo, alias `-' and `b'
Remove alias
g -s b ''
Config file
~/.git-shortcut.yml
License
MIT