Graphics in GitHub commit messages

GithubGit Commit

Github Problem Overview


How to add graphics/image in git commit messages (pushed to Github)?

Github Solutions


Solution 1 - Github

Here is a list of codes to put in your commit message to get those icons:

Emoji cheat sheet

For instance, to get this commit message:

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

enter Release 2.0.1 :gem::star2:.

If you see an icon on GitHub you want to use, hover your mouse over it, and the tooltip will tell you that icon’s code. Or copy and paste a commit message to convert icons to their codes.

That cheat sheet website is open-source – here is its code.

Caveats: you can’t put an arbitrary image into a commit message – these codes work on GitHub only because GitHub implemented the emoji on that list. And of course, it is up to the Git interface you are using to display emoji or link URLs – Git’s command-line interface will probably not do either of those.

Solution 2 - Github

Write emoji from your command line as: for emoji smile and books

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

Solution 3 - Github

In my projects I use emojis mostly for: initial commits, new features, bug fix, documentation, and code refactoring. This is how i create them

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

Here it is a list of other useful emojis that you can use

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiony2pView Question on Stackoverflow
Solution 1 - GithubRory O'KaneView Answer on Stackoverflow
Solution 2 - GithubKabir HossainView Answer on Stackoverflow
Solution 3 - GithubHamzaView Answer on Stackoverflow