Getting Started with Git AI Extension

Before diving into the Git AI extension's features, the first step is to install the extension on your system. This section provides a straightforward guide to getting started.

Installing the Git AI Extension


Ensure you have the following installed on your system before proceeding:

  • Git 2.39.3 or higher
  • Python 3.10 or higher

Installation Options:

  1. Clone the Repository: Access the git-ai repo (opens in a new tab) and follow the instructions written in file.
  2. Install via pip: Use Python's package manager to install directly.

Installation via pip:

Install the Git AI extension using pip with the following command:

python -m pip install codedepot-git-ai

This command downloads and installs the Git AI extension, integrates the git-ai command into your terminal, and includes the Git AI library for managing experiments.


To confirm the installation was successful, open a terminal and run:

git ai --version

This command will display the currently installed version of the Git AI extension, confirming that the installation was successful.

With the Git AI extension installed, you are now equipped to enhance your AI development workflow using its powerful version control and management capabilities.

Initializing Your Repository

Run Command:

git ai init


  • Creates a .git_ai folder at your repository's root, containing Git AI extension's configuration files.
  • Automatically commits this folder to the current branch, preparing your repository for Git AI extension features.

Merging Experiment Branches

Run Command:

git ai merge-exp [exp-name]


  • Merges the experiment branch [exp-name] into the current branch.
  • Ensures all metadata of .git_ai folder from [exp-name] is integrated, replacing all metadata from the current commit. Other changes are merged as if the branch was squashed. The final commit will be a merge of the two branches with the metadata of the experiment.

Check out how to create an experiment here.

Viewing Git AI Logs

Run Command:

git ai log


  • Displays a log of the repository, including all changes from their submodules.
  • Provides an overview of changes, offering a deep insight into the project's history and the impact of integrated models and data.