git 命令别名设置
-
方法
git config --global alisa.name "the operation command"
-
命令
git log-one
git config --global alias.log-one 'log --pretty=format:"%h %C(white)-%Creset %C(yellow)%cn%Creset %C(white)-%Creset %C(blue)%cr %C(red)(%cd)%Creset %C(white)-%Creset %C(green)%s%Creset" --date=format:"%Y-%m-%d %H:%m:%S" --graph --decorate --all'
- 命令
git log-short
git config --global alias.log-short 'log --dirstat --pretty=format:"%C(white)Commit: %h%Creset %n%C(green)Author: %cn%Creset %nDate: %C(auto)%cd%Creset %n %C(red)%s%Creset %C(green)%b%Creset%n" --date=format:"%Y-%m-%d %H:%m:%S"'
网友评论