git alias 自定义短命令

创建短命令,其实还是写入到了.gitconfig中

git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.undo 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'

.gitconfig的内容如下

[user]
    name = user_name
    email = server_host/server_ip
[credential]
    helper = store
[alias]
    co = checkout
    br = branch
    ci = commit
    st = status
    undo = reset HEAD --
    last = log -1 HEAD
文章目录