← 返回命令列表

Linux command

gitgres 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize

gitgres-backend init "[dbname=gitgres]" [repo_name]

Push a local Git repo

gitgres-backend push "[dbname=gitgres]" [repo_name] [path/to/repo]

Clone

gitgres-backend clone "[dbname=gitgres]" [repo_name] [path/to/dest]

List the refs

gitgres-backend ls-refs "[dbname=gitgres]" [repo_name]

Import an existing repo

./import/gitgres-import.sh [path/to/repo] "[dbname=gitgres]" [repo_name]

说明

gitgres stores Git objects and refs as rows in PostgreSQL tables. A small libgit2-based backend (gitgres-backend) translates standard Git protocol operations such as push and clone into SQL, so existing Git clients work against a database instead of a filesystem. The project's stated goal is to let Git forges (e.g. Forgejo, Gitea) drop their filesystem storage entirely and rely on the database for repositories, objects, refs, and reflog. The schema includes tables for repositories, objects, refs, and reflog, with helpers for hashing, the object store, and tree and commit parsing.

FAQ

What is the gitgres command used for?

gitgres stores Git objects and refs as rows in PostgreSQL tables. A small libgit2-based backend (gitgres-backend) translates standard Git protocol operations such as push and clone into SQL, so existing Git clients work against a database instead of a filesystem. The project's stated goal is to let Git forges (e.g. Forgejo, Gitea) drop their filesystem storage entirely and rely on the database for repositories, objects, refs, and reflog. The schema includes tables for repositories, objects, refs, and reflog, with helpers for hashing, the object store, and tree and commit parsing.

How do I run a basic gitgres example?

Run `gitgres-backend init "[dbname=gitgres]" [repo_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more gitgres examples?

This page includes 5 examples for gitgres, plus related commands for nearby Linux tasks.