gitconfig别名配置

vim ~/.gitconfig
进行配置

[user]
        name = Your Name
        email = you@yourdomain.example.com
[core]
    editor = vim
[alias]
        co = checkout
       ci = commit
        st = status
       br = branch
        hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
        ad = add
        lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative
        type = cat-file -t
        dump = cat-file -p
        cm = commit -m
    wdiff = diff --color-words

原文地址:https://www.cnblogs.com/shuqingstudy/p/11284969.html