There are so many blog post explains the complex process of setting a custom icon for a folder in OS X. Neither I don’t want to run complex scripts nor go through some complex process.
I found a simplest solution on the Github by Gregory Zuckerman. I cloned his Github icons repository to my github account. You can find the repository at the following location.
To set custom github icon to a folder in OS X, first clone or download the above repository to your mac. Then run the following command in the cloned or downloaded repository folder using your favourite terminal.
./setfileicon icns/icon.icns /path/to/your/github-folder
Using similar process you can set any custom icon to any folder in OS X.