Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

💊 A git query language

License

NotificationsYou must be signed in to change notification settings

filhodanuvem/gitql

Repository files navigation

Gitql is a Git query language.

In a repository path...

how to use

See morehere

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 youpolyglot instead.

Requirements

  • Go 1.16+

How to install

You can access thereleases page and just grab the binary. If you want to compile itself just rungo build ..

Examples

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

As an example, this is thecommits table:

commits
author
author_email
committer
committer_email
hash
date
message
full_message

(see more tableshere)

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 anissue

Notes:

  • Gitql doesn't want tokillgit log - it was created just for science! 😅
  • It's read-only - no deleting, inserting, or updating tables or commits. 😝
  • The default limit is 10 rows.
  • It's inspired bytextql.
  • 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. 😐

About

💊 A git query language

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors25


[8]ページ先頭

©2009-2025 Movatter.jp