分享一个git别名

git config --global alias.hist '!f() { git log --oneline | head -n "${1:-10}"; }; f'


用法:

git hist        # 默认显示10条
git hist 5      # 显示5条


<https://chatgpt.com/share/68813511-d298-8013-9a2c-4b3abf4e57fa>
 
 
Back to Top