使用git的小伙伴可能有此烦恼:要么commit修改很小不值得写commit信息,要么炉子上烧着壶水有人喊你打游戏要找妹子聊天来不及写commit信息,要么实在是懒不想写commit信息,
总之就是不想写commit信息。
那么可以试试这个:
在.bashrc
里添加如下代码
alias hmb='git commit -m "$(curl -s http://www.whatthecommit.com/index.txt )"'
保存,source一下
这样下次不想写commit信息的时候,输入hmb就行了,像这样:
git add a.txt
hmb
git push
不过需要注意的地方是随机生成的commit信息都很2B……
比如
commit 331a1640ceb30979304ab3e964d0b8a829024c3d
Author: tcgriffith <ztc.ustcer@gmail.com>
Date: Fri Oct 19 14:40:35 2018 +1000
someday I gonna kill someone for this shit...
commit 38dc4deee62914e3a3ee77806e84d3199c811023
Author: tcgriffith <ztc.ustcer@gmail.com>
Date: Fri Oct 19 13:23:48 2018 +1000
Don't Ask Me, I Have No Idea Why This Works Either