百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gitql

> 开发工具
开源

一种 git 查询语言

6.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一种 git 查询语言

Gitql

===============

Gitql 是一种 Git 查询语言。

在仓库路径中……

了解更多请点击这里

阅读代码

⚠️ Gitql 是我的第一个 golang 项目。如果你是一名初学者,希望参考这个项目来学习(如何组织代码或编写地道的 Go 代码),我推荐你使用 polyglot。

环境要求

  • Go 1.16+

如何安装

你可以访问 releases 页面直接下载二进制文件。如果你想自己编译,只需运行 go build .。

示例

gitql "your query" 或者 git ql "your query"

举个例子,这是 commits 表:

commits
author
author_email
committer
committer_email
hash
date
message
full_message

(更多表格请见这里)

示例命令

  • select hash, author, message from commits limit 3
  • select hash, message from commits where 'hell' in full_message or 'Fuck' in full_message
  • select hash, message, author_email from commits where author = 'cloudson'
  • select date, message from commits where date < '2014-04-10'
  • select message from commits where 'hell' in message order by date asc
  • select distinct author from commits where date < '2020-01-01'

有疑问?

gitql 或提交一个 issue

备注:

  • Gitql 并不想 干掉 git log——它只是出于科学探索而诞生的!:sweat_smile:
  • 它是只读的——不能删除、插入或更新表或提交。:stuck_out_tongue_closed_eyes:
  • 默认限制为 10 行。
  • 它的灵感来自 textql。
  • Gitql 是一个编译器/解释器,而不是简单地通过读取一个包含所有提交、标签等数据的 sqlite 数据库来实现,因为那样的话,每次运行 SQL 之前都需要同步表,而且每个仓库都会有一个 sqlite 数据库。:neutral_face:

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gogitgohacktoberfest

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具