2026-08-12 15:56:13 +02:00
2026-08-12 15:54:32 +02:00
2026-08-12 10:23:53 +02:00
2026-08-12 14:13:40 +02:00
2026-08-12 14:13:40 +02:00
2026-08-09 14:13:06 +02:00
2026-08-12 15:56:13 +02:00
2026-08-11 22:35:01 +02:00
2026-08-12 10:23:53 +02:00

git

A small command-line-like Git module for Racket, implemented directly on top of the libgit2 package.

(require git)

(git 'help)
(git 'help 'grep)
(git 'status)
(git 'diff)
(git 'diff '--cached)
(git 'add "main.rkt" "info.rkt")
(git 'restore '--staged "scratch.rkt")
(git 'reset 'HEAD "--" "main.rkt")
(git 'grep '-i '-n "todo")
(git 'commit "Implement raco support")
(git 'tag "v0.2")
(git 'branch-current)
(git 'switch "main")

;; Display-oriented variant:
(dgit 'status)

git is an ordinary procedure; command names are symbols. dgit performs the same operation, displays a compact human-readable result, and returns that result.

(git 'help) opens the locally installed Scribble documentation. A command can be supplied to jump directly to its section, for example (git 'help 'restore) or (git 'help 'grep).

For grep, the natural (git 'grep '-i "pattern") spelling is supported even though Racket's reader represents -i as the complex number 0-1i; in grep option position that value is interpreted as Git's -i flag.

The same operations are available as normal procedures such as git-status, git-add, git-commit, git-tag, git-current-branch, git-switch, and git-checkout.

Help

Open the locally installed Scribble documentation through Racket's documentation cross-reference index:

(git 'help)
(git 'help 'grep)
(git 'help 'restore)
S
Description
No description provided
Readme MIT 715 KiB
Languages
Racket 99.2%
Makefile 0.8%