git配置别名 快捷输入命令行

2018-06-06  本文已影响0人  lxy_悦
vim ~/.gitconfig

打开git配置文件进行编辑

[alias]
        s = status
        br = branch
        cm = commit
        st = stash
        a = add
        pl = pull
        ps = push
        rb = rebase
        ck = checkout
        ft = fetch

保存退出

在终端执行命令git s

On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   Makefile
        modified:   core/models.py
        modified:   requirements.txt
        modified:   web/settings_local.py
        modified:   web/urls.py

执行成功,实际上执行的是git status

上一篇下一篇

猜你喜欢

热点阅读