Linux command
gita 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
gita ll
Register repositories
gita add [path/to/repo1] [path/to/repo2]
Recursively discover and add
gita add -a [path/to/parent]
Run a git command
gita fetch
Example
gita super [repo1] [repo2] -c "git [command]"
Example
gita shell -c "[command]"
List
gita ls
Remove
gita rm [repo_name]
说明
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. 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. 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/.
参数
- add _path(s)_
- Register repositories to track. Use -a to recursively discover repos under a directory, -b for bare repos.
- rm _repo(s)_
- Unregister repositories from tracking.
- ls
- List names of all registered repositories.
- ll
- Display detailed status of all repos including branch, sync state, and modifications.
- fetch
- Run git fetch across all registered repos.
- pull
- Run git pull across all registered repos.
- super _repos_ -c _"git command"_
- Delegate any arbitrary git command to specified repos (or all if none specified).
- shell _repos_ -c _"command"_
- Run any shell command in each repo's directory.
- freeze
- Export repository paths and URLs for backup or sharing.
- clone _url_
- Clone a repository and register it.
- group add _repos_ -n _name_
- Create a named group of repositories.
- group ll
- List all groups and their contents.
- group rm _name_
- Delete a named group.
- context _group_
- Limit subsequent commands to a specific group. Use none to clear.
- info
- Configure which information items are displayed in ll output.
- color
- Manage color schemes for branch status display.
- flags set _repo_ _flags_
- Set custom git flags for a specific repository.
FAQ
What is the gita command used for?
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. 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. 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/.
How do I run a basic gita example?
Run `gita ll` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does add _path(s)_ do in gita?
Register repositories to track. Use -a to recursively discover repos under a directory, -b for bare repos.