Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gitql

> 开发工具
Open source

A git query language

6.3K stars0 likes0 views
WebsiteGitHub

About

A git query language

Gitql

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

Gitql is a Git query language.

In a repository path...

See more here

Reading the code

⚠️ Gitql is my first golang project. If you are a beginner looking for using the project as a guideline (how to organise or make an idiomatic go code), I recommend you polyglot instead.

Requirements

  • Go 1.16+

How to install

You can access the releases page and just grab the binary. If you want to compile itself just run go build ..

Examples

gitql "your query"
or
git ql "your query"

As an example, this is the commits table:

commits author author_email committer committer_email hash date message full_message

(see more tables here)

Example Commands

  • 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'

Questions?

gitql or open an issue

Notes:

  • Gitql doesn't want to kill git log - it was created just for science! :sweat_smile:
  • It's read-only - no deleting, inserting, or updating tables or commits. :stuck_out_tongue_closed_eyes:
  • The default limit is 10 rows.
  • It's inspired by textql.
  • Gitql is a compiler/interpreter instead of just read a sqlite database with all commits, tags, etc. because we would need to sync the tables every time before run sql and we would have sqlite bases for each repository. :neutral_face:

GitHub Issues· 0 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •Go 1.16+
  • •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 doesn't want to _kill_ git log - it was created just for science! :sweat_smile:
  • •It's read-only - no deleting, inserting, or updating tables or commits. :stuck_out_tongue_closed_eyes:
  • •The default limit is 10 rows.

> Tags

Gogitgohacktoberfest

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

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