git设置命令简写

来源:互联网 发布:战争之王原型 知乎 编辑:程序博客网 时间:2024/06/06 21:44

打开.gitconfig文件(在git安装目录下的\mingw64\etc),编辑如下:

[merge]
    summary = true
    tool = vimdiff
[diff]
    renames = copy
[color]
    diff = auto
    status = true
    branch = auto
    interactive = auto
    ui = auto
    log = true
[status]
    submodulesummary = -1
[mergetool "vimdiff"]
    cmd = "vim --noplugin \"$PWD/$MERGED\" \
          +\":split $PWD/$REMOTE\" +\":set buftype=nowrite\" \
          +\":vertical diffsplit $PWD/$LOCAL\" +\":set buftype=nowrite\" \
          +\":vertical diffsplit $PWD/$BASE\" +\":set buftype=nowrite\" \
          +\":wincmd l\""
[format]
    numbered = auto
[alias]
    co = checkout
    ci = commit
    st = status
    pl = pull
    ps = push
    dt = difftool
    l = log --stat
    cp = cherry-pick
    ca = commit -a
    b = branch

0 0