git-meta’s documentation

Authors:

Jules David <jules@onada.fr> Tristan Gregoire <tristan@onada.fr>

Source code:

Codeberg

Bug tracker:

Issues

License:

BSD

Generated:

May 03, 2026

Version:

0.4.1

git-meta allows you to get a clear picture of all your local repository states.

_images/terminal.png

It is based on the gitpython library

API

class gitmeta.Meta[source]

Class handling the repositories database

discover()[source]

Scan the subfolders to discover repositories

The root folder can be defined with the meta.scanroot field in your .gitconfig file. If not defined, the default scanroot is $HOME.

scan(filter_status=None)[source]

Scan all the repositories in the database for their statuses

Parameters:

filter_status (str) – Only return repositiries having the given status. Usable status are “OK”, “KO”, “remote”, “NOK” and “all”

terminal(filter_status=None)[source]

Open a terminal on each repository selected by the filter

see Meta.scan() for details on filter_status

class gitmeta.Repo(path: str | ~os.PathLike[str] | None = None, odbt: ~typing.Type[~gitdb.db.loose.LooseObjectDB] = <class 'git.db.GitCmdObjectDB'>, search_parent_directories: bool = False, expand_vars: bool = True)[source]

Bases: Repo

Class representing a repository.

Allows to perform common git commands

has_remote()[source]
Returns:

True if the repository has a remote branch defined for at least

local branch

Return type:

bool

is_dirty()[source]

Override of git.Repo.is_dirty to include untracked files in dirty state

remote_diff()[source]

For each branch with a remote counterpart, give the number of commit difference

Returns:

keys -> branch name

values -> number

Return type:

dict

stashed()[source]

List stashes

Returns:

True if there is stashed modifications

Return type:

bool

statusline(line_width=80)[source]

Create the status line for the selected repository.

Returns:

Status line as used by git-meta

Return type:

string

Tests

git-meta tests are located in the test/ folder. They are powered by pytest.

In order to launch the test series, you only have to type the command :

$ py.test

in the base folder.

Indices and tables