### Fish Completion Setup Source: https://context7.com/nosarthur/gita/llms.txt Install Fish shell auto-completion for Gita by copying the `gita.fish` file to the Fish completions directory. ```bash # Copy gita.fish to Fish completions directory cp gita.fish ~/.config/fish/completions/ ``` -------------------------------- ### Install Gita via uv Source: https://context7.com/nosarthur/gita/llms.txt Install Gita using the uv tool, a fast Python package installer and resolver. ```bash uv tool install gita ``` -------------------------------- ### Run npm Install in All Repos Source: https://context7.com/nosarthur/gita/llms.txt Execute 'gita shell npm install' to run the 'npm install' command in all repositories. ```bash gita shell npm install ``` -------------------------------- ### Bash Completion Setup Source: https://context7.com/nosarthur/gita/llms.txt Set up Bash auto-completion for Gita by sourcing the completion file or using `register-python-argcomplete`. ```bash # Download and source the completion file source /path/to/.gita-completion.bash ``` ```bash # Or use argcomplete eval "$(register-python-argcomplete gita -s bash)" ``` -------------------------------- ### Install Gita via pipx Source: https://context7.com/nosarthur/gita/llms.txt Install Gita using pipx, which ensures applications are installed in isolated environments. ```bash pipx install gita ``` -------------------------------- ### Development Installation Source: https://context7.com/nosarthur/gita/llms.txt Install Gita in editable mode for development purposes, linking to the source folder. ```bash pip3 install -e ``` -------------------------------- ### Install Gita via pip Source: https://context7.com/nosarthur/gita/llms.txt Install or upgrade Gita using pip. This is the standard method for installing Python packages. ```bash pip3 install -U gita ``` -------------------------------- ### Mix Repos and Groups in Commands Source: https://context7.com/nosarthur/gita/llms.txt Combine individual repository names and group names in commands. This example fetches from 'repo1', the 'backend' group, and 'repo2'. ```bash gita fetch repo1 backend repo2 ``` -------------------------------- ### Zsh Completion Setup Source: https://context7.com/nosarthur/gita/llms.txt Configure Zsh auto-completion for Gita. Option 1 uses Bash completion compatibility, while Option 2 uses native Zsh completion by copying the completion file. ```bash # Option 1: Use bash completion for zsh autoload -U +X bashcompinit && bashcompinit source /path/to/.gita-completion.zsh ``` ```bash # Option 2: Native zsh completion # Copy _gita to a folder in $FPATH ``` -------------------------------- ### Define Custom Sub-commands Source: https://github.com/nosarthur/gita/blob/master/README.md Examples of defining custom commands in cmds.json, including async settings, scope, and shell execution. ```json "stat":{ "cmd": "git diff --stat", "help": "show edit statistics" } ``` ```json "difftool":{ "cmd": "git difftool", "disable_async": true, "help": "show differences using a tool" } ``` ```json "comaster":{ "cmd": "checkout master", "allow_all": true, "help": "checkout the master branch" } ``` ```json "fetchcrt":{ "cmd": "git rev-parse --abbrev-ref HEAD | xargs git fetch --prune upstream", "allow_all": true, "shell": true, "help": "fetch current branch only" } ``` -------------------------------- ### Use Custom Commands Source: https://context7.com/nosarthur/gita/llms.txt Execute custom commands defined in `cmds.json` using the 'gita ' syntax. Examples include 'gita comaster', 'gita fetchcrt repo1 repo2', and 'gita sync'. ```bash gita comaster ``` ```bash gita fetchcrt repo1 repo2 ``` ```bash gita sync ``` -------------------------------- ### Run Complex Shell Pipeline Source: https://context7.com/nosarthur/gita/llms.txt Execute a complex shell pipeline using 'gita shell ""'. This example checks out the latest tag. ```bash gita shell "git describe --abbrev=0 --tags | xargs git checkout" ``` -------------------------------- ### Superman Mode with Groups Source: https://context7.com/nosarthur/gita/llms.txt Execute advanced commands across groups using 'gita super '. This example checks out the 'develop' branch. ```bash gita super backend checkout develop ``` -------------------------------- ### Gita Branch Name Utility Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Utility function to get the current branch name by parsing the `.git/HEAD` file for a given repository path. ```python get_head(path: str) -> str ``` -------------------------------- ### View Help Information Source: https://github.com/nosarthur/gita/blob/master/README.md Access the help information for Gita by running `gita -h`. This command displays a summary of available commands and options. ```bash gita -h ``` -------------------------------- ### Configure Information Items for 'gita ll' Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita info ll' to see current information items displayed in 'gita ll'. Use 'gita info add ' to add items like 'path', and 'gita info rm ' to remove them, such as 'commit_time'. 'gita info set-length' can set default column widths. ```bash gita info ll ``` ```bash gita info add path ``` ```bash gita info rm commit_time ``` ```bash gita info set-length ``` -------------------------------- ### List All Groups and Their Repos Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita group ll' to list all defined groups and the repositories associated with each. ```bash gita group ll ``` -------------------------------- ### Manage Repository Groups Source: https://github.com/nosarthur/gita/blob/master/README.md Commands to create, list, and execute actions on repository groups. ```bash gita group add repo1 repo2 -n my-group gita ll my-group gita pull my-group ``` -------------------------------- ### Create Docs Directory in Specific Repos Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita shell mkdir docs' to create a 'docs' directory in the specified repositories. ```bash gita shell repo1 repo2 mkdir docs ``` -------------------------------- ### List Repository Names or Paths Source: https://context7.com/nosarthur/gita/llms.txt Display the names of all tracked repositories or retrieve the absolute path of a specific repository. Useful for scripting or navigation. ```bash # List all repo names gita ls # Output: repo1 repo2 repo3 # Get the absolute path of a specific repo gita ls repo1 # Output: /home/user/projects/repo1 # Use with cd to navigate to a repo cd `gita ls repo1` ``` -------------------------------- ### List Contents of All Repos Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita shell ls -la' to list the contents of all repositories managed by gita. ```bash gita shell ls -la ``` -------------------------------- ### Clone Preserving Original Paths Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita clone -p -f ' to clone repositories from a freeze file while preserving their original directory paths. ```bash gita clone -p -f repos.txt ``` -------------------------------- ### Clone and Add to a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita clone -g ' to clone a repository and immediately add it to a specified group. ```bash gita clone https://github.com/user/repo.git -g my-group ``` -------------------------------- ### List All Repository Names Source: https://github.com/nosarthur/gita/blob/master/README.md Use `gita ls` to display a list of all repository names currently managed by Gita. This command provides a quick way to see all tracked repositories. ```bash gita ls ``` -------------------------------- ### Clone Repositories to Prescribed Paths Source: https://github.com/nosarthur/gita/blob/master/README.md Clone repositories from a configuration file to their originally prescribed paths using `gita clone -p -f `. This ensures repositories are placed in their exact original locations. ```bash gita clone -p -f ``` -------------------------------- ### Export All Repository Information Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita freeze' to export information about all registered repositories, including URL, name, and path. This output can be used to recreate the repository configuration. ```bash gita freeze ``` -------------------------------- ### List All Repositories with Status Source: https://context7.com/nosarthur/gita/llms.txt Display detailed status of all registered repositories, including branch information and modification indicators. Supports filtering by group and disabling colors. ```bash # Show status of all repos gita ll # Output: # repo1 main [+*] Fix authentication bug (2 hours ago) # repo2 develop [?] Add new feature (1 day ago) # repo3 feature [$] WIP: refactoring (3 days ago) # Status symbols: # + staged changes # * unstaged changes # ? untracked files/folders # $ stashed contents # Branch colors: # white - local has no remote # green - local is the same as remote # red - local has diverged from remote # purple - local is ahead of remote (good for push) # yellow - local is behind remote (good for merge) # Show status of repos in a specific group gita ll my-group # Show status grouped by group names gita ll -g # Disable colors gita ll -C ``` -------------------------------- ### Save Freeze Configuration to File Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita freeze > ' to save the exported repository information to a file for backup or migration. ```bash gita freeze > my-repos-backup.txt ``` -------------------------------- ### Add Repositories Recursively (Alternative) Source: https://github.com/nosarthur/gita/blob/master/README.md Use `gita add -r ` to recursively add Git repositories found within the specified parent path(s). ```bash gita add -r ``` -------------------------------- ### Find Files in Repositories Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita shell find . -name "*.py" -type f | head -5' to find the first 5 Python files in all repositories. ```bash gita shell find . -name "*.py" -type f | head -5 ``` -------------------------------- ### Show Current Context Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita context' to display the currently active context. If no context is set, it will indicate that. ```bash gita context ``` -------------------------------- ### Gita Specific Sub-command Formats Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Details the command formats for specific gita sub-commands like 'add' and 'super', which have unique argument requirements. ```shell gita ll gita add gita super [repo-name(s)] ``` -------------------------------- ### List Repos in a Specific Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita group ll ' to list all repositories within a specific group. ```bash gita group ll backend ``` -------------------------------- ### Add Repos to a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita group add -n ' to add repositories to a new or existing group. ```bash gita group add repo1 repo2 repo3 -n backend ``` -------------------------------- ### Clone to a Specific Directory Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita clone -C ' to clone a repository into a specified directory. ```bash gita clone https://github.com/user/repo.git -C /path/to/projects ``` -------------------------------- ### Hierarchical Repository Addition Source: https://github.com/nosarthur/gita/blob/master/README.md Recursively add repositories and generate groups based on directory structure. ```bash gita add -a src ``` ```text src ├── project1 │   ├── repo1 │   └── repo2 ├── repo3 ├── project2 │   ├── repo4 │   └── repo5 └── repo6 ``` ```text src:repo1,repo2,repo3,repo4,repo5,repo6 src-project1:repo1,repo2 src-project2:repo4,repo5 ``` -------------------------------- ### Clone from Freeze Config File Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita clone -f ' to clone repositories listed in a freeze configuration file. This is useful for migrating or backing up repository configurations. ```bash gita clone -f repos.txt ``` -------------------------------- ### Manage Information Items Source: https://github.com/nosarthur/gita/blob/master/README.md Control which information items are displayed for repositories using the `gita info` command. You can view available items, enable new items, or disable existing ones. ```bash gita info [ll] ``` ```bash gita info add ``` ```bash gita info rm ``` -------------------------------- ### Customize Display Information Source: https://github.com/nosarthur/gita/blob/master/README.md Configuration formats for info and status symbols in the gita ll command. ```csv branch,commit_msg,commit_time ``` ```csv dirty,staged,untracked,stashed,local_ahead,remote_ahead,diverged,in_sync,no_remote *,+,?,$,↑,↓,⇕,,∅ ``` -------------------------------- ### Delegate Git Command to All Repos Source: https://github.com/nosarthur/gita/blob/master/README.md Execute a Git command across all managed repositories by simply using `gita `. Gita will delegate the command to each repository, consolidating the output. ```bash gita fetch ``` -------------------------------- ### Gita Status and Context Commands Source: https://github.com/nosarthur/gita/blob/master/README.md Commands for viewing repository status and managing the active context. ```APIDOC ## gita ll ### Description Displays the status of managed repositories. ### Parameters #### Options - **** (string) - Optional - Display status for a specific group. - **-g** (flag) - Optional - Display repo summaries by groups. ``` ```APIDOC ## gita context ### Description Manages the active context for operations. ### Parameters #### Options - **** (string) - Optional - Set context to a specific group. - **auto** (flag) - Optional - Set context automatically based on current directory. - **none** (flag) - Optional - Remove current context. ``` -------------------------------- ### Clone a Single Repository Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita clone ' to clone a repository from a URL. The repository will be automatically registered with gita. ```bash gita clone https://github.com/user/repo.git ``` -------------------------------- ### Add Repositories Recursively Source: https://context7.com/nosarthur/gita/llms.txt Scan a directory and add all git repositories found within. Supports auto-generating hierarchical groups and skipping submodules. ```bash # Recursively add all repos in a directory gita add -r /path/to/projects # Recursively add repos and auto-generate hierarchical groups gita add -a /path/to/projects # This creates groups like: # projects:repo1,repo2,repo3 # projects-frontend:repo1,repo2 # projects-backend:repo3 # Add bare repositories gita add -b /path/to/bare-repo # Skip submodule repos when adding recursively gita add -r /path/to/projects -s ``` -------------------------------- ### Display Repo Summaries by Groups Source: https://github.com/nosarthur/gita/blob/master/README.md Use the `-g` flag with `gita ll` to display repository summaries organized by their respective groups. This provides a hierarchical overview of your repository statuses. ```bash gita ll -g ``` -------------------------------- ### Check Disk Usage Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita shell du -sh .' to check the disk usage of the current directory across all repositories. ```bash gita shell du -sh . ``` -------------------------------- ### Show Status of a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita ll ' to display the status of all repositories in a specified group. ```bash gita ll frontend ``` -------------------------------- ### Execute Built-in Git Commands Source: https://context7.com/nosarthur/gita/llms.txt Delegate predefined git commands (like fetch, pull, push, status) to specified repositories or all registered repositories. ```bash # Fetch from all repos (allow_all commands work without specifying repos) gita fetch # Fetch from specific repos gita fetch repo1 repo2 # Pull from all repos gita pull # Push all repos gita push # Show status gita st repo1 # Show local branches gita br repo1 repo2 # Show diff statistics gita stat # Show logs gita log repo1 # Show one-line log for latest 7 commits gita lo repo1 # Show remote settings gita remote repo1 # Show tags gita tag repo1 # Stash changes gita stash repo1 repo2 # Clean untracked files (careful!) gita clean repo1 # Merge remote updates gita merge repo1 # Reset repo gita reset repo1 ``` -------------------------------- ### Add a Single Repository Source: https://context7.com/nosarthur/gita/llms.txt Add one or more local git repositories to Gita's tracking list. Use the '-n' flag for a dry run to see what would be added without making changes. ```bash # Add a single repo gita add /path/to/my-repo # Add multiple repos gita add /path/to/repo1 /path/to/repo2 /path/to/repo3 # Add repos to a specific group gita add /path/to/repo1 /path/to/repo2 -g my-project # Dry run to see what would be added gita add /path/to/repos -n ``` -------------------------------- ### List Group Names Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita group ls' to list only the names of all defined groups. ```bash gita group ls ``` -------------------------------- ### Configure Branch Colors Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita color ll' to view available colors and current schemes. Use 'gita color set ' to customize colors for branch statuses like 'in_sync', 'diverged', 'local_ahead', 'remote_ahead', and 'no_remote'. Use 'gita color reset' to revert to defaults. ```bash gita color ll ``` ```bash gita color set in_sync green ``` ```bash gita color set diverged red ``` ```bash gita color set local_ahead purple ``` ```bash gita color set remote_ahead yellow ``` ```bash gita color set no_remote white ``` ```bash gita color reset ``` -------------------------------- ### Fetch All Repos in a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita fetch ' to fetch updates for all repositories within a specified group. ```bash gita fetch backend ``` -------------------------------- ### Define Git Aliases as Gita Commands Source: https://github.com/nosarthur/gita/blob/master/README.md Integrating git aliases into the gita command structure. ```bash [alias] cod = "!f() { git checkout \"$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')\"; }; f" ``` ```json { "cod": { "cmd": "git cod", "allow_all": true, "help": "check out default branch" } } ``` -------------------------------- ### Delegate Arbitrary Git Command (Superman Mode) Source: https://github.com/nosarthur/gita/blob/master/README.md Enter 'superman mode' to delegate any arbitrary Git command to all managed repositories. This is useful for executing commands not explicitly supported by Gita. ```bash gita superman ``` -------------------------------- ### Shell mode usage Source: https://github.com/nosarthur/gita/blob/master/README.md Execute arbitrary shell commands across multiple repositories. ```bash gita shell [repo-name(s) or group-name(s)] ``` -------------------------------- ### Manage Gita Context Source: https://github.com/nosarthur/gita/blob/master/README.md The `gita context` command allows you to manage the active repository context. You can view the current context, set it to a specific group, enable automatic context switching based on your working directory, or remove the context entirely. ```bash gita context ``` ```bash gita context ``` ```bash gita context auto ``` ```bash gita context none ``` -------------------------------- ### Set Custom Git Flags Source: https://github.com/nosarthur/gita/blob/master/README.md Configuring specific git flags for repositories, useful for bare repositories. ```bash gita flags set my-repo --git-dir=`gita ls dotfiles` --work-tree=$HOME ``` ```bash git --git-dir=$HOME/somefolder --work-tree=$HOME status ``` -------------------------------- ### Superman mode usage Source: https://github.com/nosarthur/gita/blob/master/README.md Execute arbitrary git commands across multiple repositories. ```bash gita super [repo-name(s) or group-name(s)] ``` -------------------------------- ### Add Repositories Recursively Source: https://github.com/nosarthur/gita/blob/master/README.md To add all Git repositories within a directory and its subdirectories, use `gita add -a `. This command automatically generates hierarchical groups. ```bash gita add -a ``` -------------------------------- ### Display All Repo Status Source: https://github.com/nosarthur/gita/blob/master/README.md Use `gita ll` to display the status of all managed Git repositories. This command provides a consolidated view of branches and modifications across all repositories. ```bash gita ll ``` -------------------------------- ### Execute Arbitrary Git Commands (Superman Mode) Source: https://context7.com/nosarthur/gita/llms.txt Execute any git command or alias across multiple repositories. This mode allows for flexible and powerful Git operations on selected or all repos. ```bash # Checkout master on all repos gita super checkout master # Checkout a branch on specific repos gita super repo1 repo2 checkout feature-branch # Commit with message on specific repos gita super frontend backend commit -am 'implement new feature' # Create a new branch on all repos gita super checkout -b new-feature # Git aliases also work gita super repo1 your-git-alias # Show diff for specific files gita super repo1 diff --name-only --staged # Add all files and commit gita super repo1 repo2 add -A gita super repo1 repo2 commit -m "Update dependencies" ``` -------------------------------- ### Execute Arbitrary Shell Commands (Shell Mode) Source: https://context7.com/nosarthur/gita/llms.txt Execute any shell command within the directories of specified repositories or all repositories. This is useful for running custom scripts or commands. ```bash ``` -------------------------------- ### Add Bare Repository to Gita Source: https://github.com/nosarthur/gita/blob/master/README.md Add bare Git repositories to Gita using `gita add -b `. This is useful for managing repositories without a working directory. ```bash gita add -b ``` -------------------------------- ### Rename and Remove Repositories Source: https://context7.com/nosarthur/gita/llms.txt Manage registered repository names using `gita rename` and `gita rm`. Use `gita clear` to remove all repos and groups. ```bash # Rename a repo gita rename old-repo-name new-repo-name ``` ```bash # Remove repo from gita (doesn't delete files) gita rm repo1 ``` ```bash # Remove multiple repos gita rm repo1 repo2 repo3 ``` ```bash # Clear all repos and groups gita clear ``` ```bash # Remove repos in a group using pipeline gita group ll old-group | xargs gita rm ``` -------------------------------- ### Gita Command Execution Function Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Illustrates the function signature used to execute git commands via subprocess or asyncio, depending on input and command type. ```python f_git_cmd(args: argparse.Namespace) ``` -------------------------------- ### Gita Sub-command Action Function Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Shows the function signature for handling specific gita sub-commands like bookkeeping or the 'super' command. ```python f_(args: argparse.Namespace) ``` -------------------------------- ### Configure Status Symbols Source: https://context7.com/nosarthur/gita/llms.txt Create or modify the `~/.config/gita/symbols.csv` file to customize the symbols used for repository status indicators. ```csv dirty,staged,untracked,stashed,local_ahead,remote_ahead,diverged,in_sync,no_remote *,+,?,S,↑,↓,⇕,,∅ ``` -------------------------------- ### Gita Repository Path Utility Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Utility function to retrieve repository names and their corresponding paths. It parses the repo path configuration from `$XDG_CONFIG_HOME/gita/repo_path`. ```python get_repos() -> Dict[str, str] ``` -------------------------------- ### Delegate Arbitrary Shell Command (Shell Mode) Source: https://github.com/nosarthur/gita/blob/master/README.md Execute arbitrary shell commands across all managed repositories using 'shell mode'. This provides flexibility for running custom scripts or commands within the context of your repositories. ```bash gita shell ``` -------------------------------- ### Export Repositories from a Specific Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita freeze -g ' to export information only for repositories belonging to a specified group. ```bash gita freeze -g backend ``` -------------------------------- ### Define Custom Commands in cmds.json Source: https://context7.com/nosarthur/gita/llms.txt Configure custom commands in `~/.config/gita/cmds.json`. This JSON defines commands like 'comaster', 'cod', 'fetchcrt', 'sync', and 'amend' with their corresponding Git operations. ```json { "comaster": { "cmd": "checkout master", "allow_all": true, "help": "checkout the master branch" }, "cod": { "cmd": "git cod", "allow_all": true, "help": "check out default branch (requires git alias)" }, "fetchcrt": { "cmd": "git rev-parse --abbrev-ref HEAD | xargs git fetch --prune upstream", "allow_all": true, "shell": true, "help": "fetch current branch only from upstream" }, "sync": { "cmd": "git fetch && git rebase origin/main", "allow_all": true, "shell": true, "help": "fetch and rebase on main" }, "amend": { "cmd": "git commit --amend --no-edit", "disable_async": true, "help": "amend the last commit without changing message" } } ``` -------------------------------- ### Manage Custom Flags for Repositories Source: https://github.com/nosarthur/gita/blob/master/README.md Assign custom flags to repositories using `gita flags set `. You can view repositories with custom flags using `gita flags [ll]`. ```bash gita flags set ``` ```bash gita flags [ll] ``` -------------------------------- ### Add Repository to Gita Source: https://github.com/nosarthur/gita/blob/master/README.md Use `gita add ` to register a Git repository with Gita. You can optionally specify a group name using the `-g` flag to organize your repositories. ```bash gita add [-g ] ``` -------------------------------- ### Gita Sub-command Formats Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Defines the general command structure for gita sub-commands, including bookkeeping and delegating types. ```shell gita gita [repo-name(s)] ``` -------------------------------- ### Delegate Git Command to Specific Repo Source: https://github.com/nosarthur/gita/blob/master/README.md Delegate a Git command to a specific repository by prefixing the command with `gita `. This executes the command only within the specified repository, regardless of your current working directory. ```bash gita remote dotfiles ``` -------------------------------- ### Dry Run Clone Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita clone -n' to perform a dry run of the clone operation, showing the command that would be executed without actually cloning. ```bash gita clone https://github.com/user/repo.git -n ``` -------------------------------- ### Manage Git Repository Groups Source: https://github.com/nosarthur/gita/blob/master/README.md The `gita group` command provides comprehensive management for repository groups. You can add repositories to groups, list existing groups and their contents, rename groups, remove groups, and remove repositories from groups. ```bash gita group add -n ``` ```bash gita group [ll] ``` ```bash gita group ls ``` ```bash gita group rename ``` ```bash gita group rm ``` ```bash gita group rmrepo -n ``` -------------------------------- ### Pull for Multiple Groups Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita pull ' to pull changes for all repositories in the specified groups. ```bash gita pull backend frontend ``` -------------------------------- ### Gita Bookkeeping Commands Source: https://github.com/nosarthur/gita/blob/master/README.md Commands for managing the registration and organization of git repositories within the Gita tool. ```APIDOC ## gita add ### Description Adds repository paths to Gita for management. ### Parameters #### Path Parameters - **repo-path(s)** (string) - Required - Path to the repository to add. #### Options - **-g ** (string) - Optional - Add repo(s) to an existing group. - **-a ** (string) - Optional - Add repos recursively and generate hierarchical groups. - **-b ** (string) - Optional - Add bare repositories. - **-r ** (string) - Optional - Add repos recursively. ``` ```APIDOC ## gita clone ### Description Clones repositories using Gita configuration or URLs. ### Parameters #### Options - **** (string) - Required - URL of the repository to clone. - **-C ** (string) - Optional - Change to directory before cloning. - **-f ** (string) - Optional - Clone repos defined in a config file. - **-p** (flag) - Optional - Clone to prescribed paths. ``` -------------------------------- ### Set Auto Context Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita context auto' to set the context automatically based on the current working directory's parent group. ```bash gita context auto ``` -------------------------------- ### Manage Gita Colors Source: https://github.com/nosarthur/gita/blob/master/README.md Customize the color scheme used for displaying repository statuses with the `gita color` command. You can view available colors, reset to defaults, or set specific colors for different local-remote branch situations. ```bash gita color [ll] ``` ```bash gita color reset ``` ```bash gita color set ``` -------------------------------- ### Rename a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita group rename ' to rename an existing group. ```bash gita group rename backend api-services ``` -------------------------------- ### Configure gita alias Source: https://github.com/nosarthur/gita/blob/master/README.md Add an alias to .bashrc if the gita command is not directly available in the terminal. ```bash alias gita="python3 -m gita" ``` -------------------------------- ### Clear All Groups and Repos Source: https://github.com/nosarthur/gita/blob/master/README.md To remove all configured groups and repositories from Gita, use the `gita clear` command. This action resets Gita to its default state. ```bash gita clear ``` -------------------------------- ### Set Custom Git Flags for Repos Source: https://context7.com/nosarthur/gita/llms.txt Configure custom git flags for specific repositories, such as bare repositories or worktrees. Use `gita flags ll` to list repos with custom flags. ```bash # Set flags for a repo (useful for dotfiles bare repos) gita flags set dotfiles --git-dir=/home/user/.dotfiles --work-tree=/home/user ``` ```bash # List repos with custom flags gita flags ll # Output: # dotfiles: --git-dir=/home/user/.dotfiles --work-tree=/home/user ``` ```bash # Commands now use these flags gita st dotfiles # Translates to: git --git-dir=/home/user/.dotfiles --work-tree=/home/user status ``` -------------------------------- ### Set Group Context Source: https://github.com/nosarthur/gita/blob/master/README.md Commands to scope gita operations to a specific group or automatically based on the current directory. ```bash gita context my-group gita ll gita pull ``` ```bash gita context auto ``` ```bash gita context none ``` -------------------------------- ### Bash Alias for Gita Source: https://context7.com/nosarthur/gita/llms.txt Configure a bash alias for Gita if the 'gita' command is not recognized directly. This maps 'gita' to the Python module execution. ```bash # Add to .bashrc alias gita="python3 -m gita" ``` -------------------------------- ### Remove Context Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita context none' to remove any active context, returning gita commands to their default behavior. ```bash gita context none ``` -------------------------------- ### Set Context to a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita context ' to set the active context to a specific group. All subsequent gita commands will only apply to repositories within this group. ```bash gita context my-project ``` -------------------------------- ### Remove a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita group rm ' to remove a group. Repositories remain registered. ```bash gita group rm old-group ``` -------------------------------- ### Gita Repository Status Utility Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Utility function to determine the local/remote relation and edit status (unstaged, staged, untracked files) of a repository by running a subprocess. ```python _get_repo_status(path: str) -> Tuple[str] ``` -------------------------------- ### Remove Repos from a Group Source: https://context7.com/nosarthur/gita/llms.txt Use 'gita group rmrepo -n ' to remove a specific repository from a group. ```bash gita group rmrepo repo1 -n backend ``` -------------------------------- ### Gita Commit Message Utility Source: https://github.com/nosarthur/gita/blob/master/doc/design.md Utility function to retrieve the latest commit message by running a subprocess command. ```python get_commit_msg() -> str ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.