Git utilities: a Java library providing a unified abstraction over Git hosting providers ( GitHub, GitLab, Bitbucket, Azure DevOps) and optional REST client helpers.
This library is part of the Open Data Mesh Platform. It offers:
- Git provider abstraction — A single
GitProviderinterface implemented for GitHub, GitLab, Bitbucket, and Azure DevOps, with operations for users, organizations, repositories, commits, branches, and tags. - Low-level Git operations — Clone, init, add, commit, push, tag, and resolve HEAD via a
GitOperationfacade ( JGit-based). - REST client utilities — Optional helpers for HTTP calls and pagination (
org.opendatamesh.platform.git.client).
Consuming applications (e.g. the ODM Platform Registry) implement their own factory to create provider instances (using their own provider-type enum and credentials).
- Java 21 or higher
- Maven 3.6 or higher
# Clone the repository
git clone https://github.com/opendatamesh-initiative/git-utils.git
# Navigate to project directory
cd git-utils
# Build the project
mvn clean install
# Run tests
mvn verifyAdd the library to your project:
<dependency>
<groupId>org.opendatamesh</groupId>
<artifactId>git-utils</artifactId>
<version>1.0.0</version>
</dependency>If the artifact is published to GitHub Packages, add the repository (and matching server in ~/.m2/settings.xml with
GITHUB_TOKEN):
<repositories>
<repository>
<id>odm-git-utils-repo</id>
<name>GitHub Packages for ODM Platform Git Utils</name>
<url>https://maven.pkg.github.com/opendatamesh-initiative/git-utils</url>
</repository>
</repositories>org.opendatamesh.platform.git.provider—GitProviderinterface,GitProviderIdentifier, and implementations ( GitHub, GitLab, Bitbucket, Azure DevOps).org.opendatamesh.platform.git.model— Shared models (Repository, Branch, Commit, Tag, User, Organization, RepositoryPointer, etc.).org.opendatamesh.platform.git.git— Low-level Git operations (GitOperation,GitOperationImpl) and credential types.org.opendatamesh.platform.git.exceptions—GitException,GitOperationException,GitClientException,GitProviderAuthenticationException,GitProviderConfigurationException.org.opendatamesh.platform.git.client— Optional REST client utilities and exceptions.
For detailed design, extension points, and how-to guides (extending resources, custom resources, adding a provider), see:
Run the test suite:
# Run all tests
mvn test
# Full verify (tests + any checks)
mvn verifyUnit tests for each provider (GitHub, GitLab, Bitbucket, Azure) and for GitOperationImpl are under
src/test/java/org/opendatamesh/platform/git/, with JSON fixtures in src/test/resources/.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
For support, please open an issue in the GitHub repository.