Skip to content

3Taste/git-heatmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-heatmap

在终端以热力图形式展示任意 git 仓库的逐日提交次数。

  2026-05 提交热力图

   一  二  三  四  五  六  日
               ░░  ░░  ░░
  ░░  ░░  ░░  ░░  ░░  ░░  ██
  ░░  ░░  ░░  ░░  ░░  ░░  ░░
  ...

  图例: ░░ 无提交  ▒▒ 1-2次  ▓▓ 3-5次  ██ 6-9次  ██ 10+次

依赖

  • bash 3.2+(兼容 macOS 默认 bash)
  • python3 或 python(用于计算月份天数)
  • git

安装

git clone https://github.com/your-username/git-heatmap.git
chmod +x git-heatmap/git-heatmap

git-heatmap 目录加入 PATH,或直接复制 git-heatmapgit_data.shgit_render.sh 三个文件到同一目录。

用法

在任意 git 仓库目录下执行:

# 显示当前月份
git-heatmap

# 指定月份
git-heatmap --month 2026-03

# 帮助
git-heatmap --help

文件结构

git-heatmap      # CLI 入口,参数解析
git_data.sh      # 模块一:git log 数据采集,输出日期→次数 JSON
git_render.sh    # 模块二:ANSI 热力图渲染引擎

颜色等级

等级 提交次数
0
暗绿 1–2
绿 3–5
亮绿 6–9
纯绿 10+

License

MIT

About

终端 git 提交热力图 —— 在任意 git 仓库中以彩色日历网格展示每日提交次数。纯 bash 实现,兼容 macOS 默认 bash 3.2+,仅需 python3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages