gitonomy/gitlib 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gitonomy/gitlib

最新稳定版本:v1.5.0

Composer 安装命令:

composer require gitonomy/gitlib

包简介

Library for accessing git

README 文档

README

Build Status StyleCI License Downloads

This library provides methods to access Git repository from PHP 5.6+.

It makes shell calls, which makes it less performant than any solution.

Anyway, it's convenient and don't need to build anything to use it. That's how we love it.

Quick Start

You can install gitlib using Composer. Simply require the version you need:

$ composer require gitonomy/gitlib

or edit your composer.json file by hand:

{
    "require": {
        "gitonomy/gitlib": "^1.3"
    }
}

Example Usage

<?php

use Gitonomy\Git\Repository;

$repository = new Repository('/path/to/repository');

foreach ($repository->getReferences()->getBranches() as $branch) {
    echo '- '.$branch->getName().PHP_EOL;
}

$repository->run('fetch', ['--all']);

API Documentation

For Enterprise

Available as part of the Tidelift Subscription

The maintainers of gitonomy/gitlib and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

统计信息

  • 总下载量: 17.65M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 466
  • 点击次数: 1
  • 依赖项目数: 64
  • 推荐数: 0

GitHub 信息

  • Stars: 461
  • Watchers: 23
  • Forks: 73
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04