There are always some people who care about the color of their squares in their GitHub activity graph. Now they can do what they want to do. This repository contains a bash script which can build git commits automatically in order to change the color of squares of GitHub.
- Edit the
build.txt
file to make the character picture whose size is 53x7 as you want. The colors from light to dark are corresponding to five charactors:[01234]
. Besides, five alternative charactors are used for editing pictures more clearly:[ .-+*]
(the first one is white space). - Run
./build.sh
and wait until it finishes. - Locate yourself to the
build/
directory. - Create a repo in GitHub, then run
git remote add origin <url-for-your-github-repo>
, the<url-for-your-github-repo>
is commonly likehttps://github.com/<your-github-id>/<your-repo-name>
orgit@github.com:<your-github-id>/<your-repo-name>
. - Run
git push origin master
and wait until it completes its work. - Open
https://github.com/<your-github-id>
and it works almost as you want.
- Mostly the same as the steps of common usage, the only thing you should do is to specify the last date like this:
./build.sh -d <your-date>
, and the script will generate from the date one year ago to a date before the date you specify. In another word, there will not be any commit generated at the day you specify.
- GitHub will not work normally without correct email and name. you can customize them by using
./build.sh -u <your-name> -e <your-email>
.
Here is the example generated by the author himself.
Of course, there may be some "noise"s, but in fact, which are the noises actually?
总有一些人很在乎他们GitHub活动图上的小框框的颜色,那么现在就让他们玩个够。本代码仓库包含了一个Bash脚本用于自动进行Git提交以修改GitHub小框框的颜色。
- 编辑
build.txt
以修改大小为53x7的字符画为你想要的样子。五种颜色从浅到深分别对应:[01234]
,脚本同时提供了五种额外的字符用于更清晰地修改字符画:[ .-+*]
(第一个字符是空格)。 - 运行
./build.sh
然后等待它完成。 - 定位到当前目录下的
build
文件夹。 - 在GitHub上创建一个代码仓库,然后运行
git remote add origin <url-for-your-github-repo>
,这里的<url-for-your-github-repo>
通常表现为https://github.com/<your-github-id>/<your-repo-name>
或git@github.com:<your-github-id>/<your-repo-name>
的格式。 - 运行
git push origin master
并等待Git工作完成。 - 打开
https://github.com/<your-github-id>
你就可以注意到它几乎正常工作了。
- 和通常用法中的做法几乎一致,你需要多做的唯一一件事就是指定最后的日期,就像这样:
./build.sh -d <your-date>
,然后脚本将会自动从约一年前的一天填充提交到你指定的那一天的前一天。换句话说,你指定的那一天不会生成提交。
- 不正确的姓名和邮箱会导致GitHub不正常工作。不过你可以通过
./build.sh -u <your-name> -e <your-email>
自定义他们。
这里是作者本人生成的一个示例。
当然,生成的图可能会有一些“噪点”,不过静下心来想想,到底哪些才是真正的噪点呢?