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

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 ..." to update what will be committed)
  (use "git checkout -- ..." 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

你可能感兴趣的:(git配置别名 快捷输入命令行)