GitHub 中的图形提交消息

如何在 git 提交消息中添加图形/图像(推送到 Github) ?

24867 次浏览

下面是在提交消息中输入代码以获得这些图标的列表:

表情符号小抄

例如,要得到 这个提交消息:

Release 2.0.1 :gem::star2: (example commit message with emoji)

输入 Release 2.0.1 :gem::star2:

如果您在 GitHub 上看到您想使用的图标,将鼠标悬停在其上,工具提示将告诉您该图标的代码。或者复制并粘贴提交消息以将图标转换为其代码。

那个备忘单网站是开源的——这里是 它的密码

警告: 你不能在提交消息中放入任意的图片——这些代码在 GitHub 上可以工作,只是因为 GitHub 在提交消息列表中实现了表情符号。当然,这取决于你用来显示表情符号或链接 URL 的 Git 界面—— Git 的命令行界面可能两者都做不到。

从你的命令行中写出表情符号: 用于表情符号微笑和书籍

     git commit -m ":smile: your message"
git commit -m ":books: documentation is completed"

在我的项目中,我主要使用表情包: 初始提交、新功能、 bug 修复、文档和代码重构。我就是这么创造他们的

git commit -m ":tada: for initial commit"
git commit -m ":sparkles: for a new feature"
git commit -m ":bug: for a bug fix"
git commit -m ":books: for documentation"
git commit -m ":hammer: for code refactoring"

enter image description here enter image description here enter image description here enter image description here enter image description here

这里是一个 名单的其他有用的表情符号,你可以使用

在提交信息中加一个表情符号:

git commit -m "We did it, time to party :partying_face:"

enter image description here



GitHub 表情包(不完整)列表可以在这里找到: https://gist.github.com/rxaviers/7360908