|
| 1 | +# TAGLINE |
| 2 | + |
| 3 | +Manage multiple Git repositories side by side |
| 4 | + |
| 5 | +# TLDR |
| 6 | + |
| 7 | +Display **status of all registered** repositories |
| 8 | + |
| 9 | +```gita ll``` |
| 10 | + |
| 11 | +**Register repositories** to be tracked |
| 12 | + |
| 13 | +```gita add [path/to/repo1] [path/to/repo2]``` |
| 14 | + |
| 15 | +**Recursively discover and add** all repos under a directory |
| 16 | + |
| 17 | +```gita add -a [path/to/parent]``` |
| 18 | + |
| 19 | +**Run a git command** across all registered repos |
| 20 | + |
| 21 | +```gita fetch``` |
| 22 | + |
| 23 | +Run an **arbitrary git command** across specific repos |
| 24 | + |
| 25 | +```gita super [repo1] [repo2] -c "git [command]"``` |
| 26 | + |
| 27 | +Run a **shell command** across all repos |
| 28 | + |
| 29 | +```gita shell -c "[command]"``` |
| 30 | + |
| 31 | +**List** all registered repository names |
| 32 | + |
| 33 | +```gita ls``` |
| 34 | + |
| 35 | +**Remove** a repository from tracking |
| 36 | + |
| 37 | +```gita rm [repo_name]``` |
| 38 | + |
| 39 | +# SYNOPSIS |
| 40 | + |
| 41 | +**gita** [_subcommand_] [_options_] [_repos_] |
| 42 | + |
| 43 | +# PARAMETERS |
| 44 | + |
| 45 | +**add** _path(s)_ |
| 46 | +> Register repositories to track. Use **-a** to recursively discover repos under a directory, **-b** for bare repos. |
| 47 | +
|
| 48 | +**rm** _repo(s)_ |
| 49 | +> Unregister repositories from tracking. |
| 50 | +
|
| 51 | +**ls** |
| 52 | +> List names of all registered repositories. |
| 53 | +
|
| 54 | +**ll** |
| 55 | +> Display detailed status of all repos including branch, sync state, and modifications. |
| 56 | +
|
| 57 | +**fetch** |
| 58 | +> Run git fetch across all registered repos. |
| 59 | +
|
| 60 | +**pull** |
| 61 | +> Run git pull across all registered repos. |
| 62 | +
|
| 63 | +**super** [_repos_] **-c** _"git command"_ |
| 64 | +> Delegate any arbitrary git command to specified repos (or all if none specified). |
| 65 | +
|
| 66 | +**shell** [_repos_] **-c** _"command"_ |
| 67 | +> Run any shell command in each repo's directory. |
| 68 | +
|
| 69 | +**freeze** |
| 70 | +> Export repository paths and URLs for backup or sharing. |
| 71 | +
|
| 72 | +**clone** _url_ |
| 73 | +> Clone a repository and register it. |
| 74 | +
|
| 75 | +**group add** _repos_ **-n** _name_ |
| 76 | +> Create a named group of repositories. |
| 77 | +
|
| 78 | +**group ll** |
| 79 | +> List all groups and their contents. |
| 80 | +
|
| 81 | +**group rm** _name_ |
| 82 | +> Delete a named group. |
| 83 | +
|
| 84 | +**context** _group_ |
| 85 | +> Limit subsequent commands to a specific group. Use **none** to clear. |
| 86 | +
|
| 87 | +**info** |
| 88 | +> Configure which information items are displayed in **ll** output. |
| 89 | +
|
| 90 | +**color** |
| 91 | +> Manage color schemes for branch status display. |
| 92 | +
|
| 93 | +**flags set** _repo_ _flags_ |
| 94 | +> Set custom git flags for a specific repository. |
| 95 | +
|
| 96 | +# DESCRIPTION |
| 97 | + |
| 98 | +**gita** is a command-line tool for managing multiple Git repositories simultaneously. It provides a unified view of repository statuses and allows batch execution of git commands across all tracked repos from any working directory, without needing to cd into each one individually. |
| 99 | + |
| 100 | +Repositories are registered with **gita add** and their paths are stored in **$XDG_CONFIG_HOME/gita/repos.csv**. Once registered, **gita ll** displays a color-coded summary of each repo's branch, sync state (ahead/behind remote), and working tree modifications. Git commands like **fetch** and **pull** can be delegated to all repos at once, and arbitrary git or shell commands can be run via **super** and **shell** subcommands. |
| 101 | + |
| 102 | +Repos can be organized into named **groups** and scoped with **context** to limit operations to a subset. Configuration files for groups, colors, display info, and custom commands are stored in **$XDG_CONFIG_HOME/gita/**. |
| 103 | + |
| 104 | +# CAVEATS |
| 105 | + |
| 106 | +Requires **Python 3.6+**. Batch operations run asynchronously across repos, but commands requiring user interaction (such as **log**, **difftool**, **mergetool**) run synchronously to avoid garbled output. By default only **fetch** and **pull** are allowed to run across all repos without specifying targets; other commands require explicit repo names unless custom configuration overrides this. On Windows, ANSI color output must be enabled manually. |
| 107 | + |
| 108 | +# HISTORY |
| 109 | + |
| 110 | +**gita** was created by **nosarthur** and first released in **January 2018**. Written in **Python**, it is distributed via PyPI and installable with pip, pipx, or uv. The name is a play on "git" with an added "a" suggesting management of multiple repos. The project is MIT-licensed and actively maintained. |
| 111 | + |
| 112 | +# SEE ALSO |
| 113 | + |
| 114 | +[git](/man/git)(1), [mr](/man/mr)(1), [ghq](/man/ghq)(1) |
0 commit comments