Skip to content

quickly run git commands work with multiple repos without switch directory

Notifications You must be signed in to change notification settings

yangg/git-shortcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-shortcut

Build Status Code Climate npm: Dependency Status

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 pull
g ../static pull  # 直接操作目录
g push            # 如果没有别名匹配时, g 相当于 git 的别名
                  # work as a alias for git if no alias matched

使用特殊别名 -,用于经常切换于两个 repo 之间时,操作相对应的另一个项目

special alias -, work on the related repo, and vice versa

# cwd Main
g -s - ../static    # 添加`-'别名
g - status          #
cd ../static
g - 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'

git-shortcut usage

Remove alias

g -s b ''

Config file

~/.git-shortcut.yml

License

MIT

About

quickly run git commands work with multiple repos without switch directory

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published