PHPackages                             68publishers/tracy-git-version - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. 68publishers/tracy-git-version

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

68publishers/tracy-git-version
==============================

Git version panel for Tracy.

v1.2.1(1y ago)210.0k↓42.4%2MITPHPPHP ^7.4 | ^8.0CI passing

Since Jan 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/68publishers/tracy-git-version)[ Packagist](https://packagist.org/packages/68publishers/tracy-git-version)[ RSS](/packages/68publishers-tracy-git-version/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (11)Versions (7)Used By (0)

Tracy Git version
=================

[](#tracy-git-version)

Simple and extensible panel for [Tracy](https://github.com/nette/tracy) that shows information from Git.

[![Tracy Git version panel](docs/images/tracy-panel-header.png)](docs/images/tracy-panel-header.png)

[![Checks](https://camo.githubusercontent.com/849db461185ee9737b03f13edb2585a30e32731961e517f4e06f2d5eaba65800/68747470733a2f2f62616467656e2e6e65742f6769746875622f636865636b732f36387075626c6973686572732f74726163792d6769742d76657273696f6e2f6d61696e)](https://github.com/68publishers/tracy-git-version/actions)[![Coverage Status](https://camo.githubusercontent.com/bb3635b3854dee6503b4e16ce13f108faad370505e2221efd32065f7470b4869/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f36387075626c6973686572732f74726163792d6769742d76657273696f6e2f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/68publishers/tracy-git-version?branch=main)[![Total Downloads](https://camo.githubusercontent.com/840e232bbd86513eb64de0f3661edae3158f80681f1e549cec9be810c35162da/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f36387075626c6973686572732f74726163792d6769742d76657273696f6e)](https://packagist.org/packages/68publishers/tracy-git-version)[![Latest Version](https://camo.githubusercontent.com/603a90badcc172ac3ae017a502962c78eb236e37ce5d11206c52caddbe0d92f5/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f36387075626c6973686572732f74726163792d6769742d76657273696f6e)](https://packagist.org/packages/68publishers/tracy-git-version)[![PHP Version](https://camo.githubusercontent.com/b75dd7cf3275987f9957f2f96fb8ff5342ebda31e837bcffa240b4dff595f90b/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f36387075626c6973686572732f74726163792d6769742d76657273696f6e)](https://packagist.org/packages/68publishers/tracy-git-version)

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic integration](#basic-integration)
- [Solution for application builds without Git](#solution-for-application-builds-without-git)
- [Advanced guide](#advanced-guide)
- [Contributing](#contributing)
- [License](#license)

Installation
------------

[](#installation)

The best way to install `68publishers/tracy-git-version` is using Composer:

```
$ composer require 68publishers/tracy-git-version
```

Basic integration
-----------------

[](#basic-integration)

### Standalone Tracy integration

[](#standalone-tracy-integration)

The simplest way how to register the panel into Tracy is by creating a default instance and providing it directly into a Bar.

```
use Tracy\Debugger;
use SixtyEightPublishers\TracyGitVersion\Bridge\Tracy\GitVersionPanel;

Debugger::getBar()->addPanel(GitVersionPanel::createDefault());
```

### Integration into Nette Framework

[](#integration-into-nette-framework)

Basic integration into Nette is really simple. Just register an extension.

```
extensions:
    68publishers.tracy_git_version: SixtyEightPublishers\TracyGitVersion\Bridge\Nette\DI\TracyGitVersionExtension
```

And everything works 😉

Solution for application builds without Git
-------------------------------------------

[](#solution-for-application-builds-without-git)

Often when we deploy an application to a production environment, neither Git nor the `.git` directory is available due to trying to have a build as small as possible. However, at this moment we have no source of information about the current version. The solution is to export a file that contains all important information at the time when the Git is still accessible.

### Setup for standalone Tracy

[](#setup-for-standalone-tracy)

You must create repositories and the panel manually but there is not much work to do.

```
use Tracy\Debugger;
use SixtyEightPublishers\TracyGitVersion\Bridge\Tracy\GitVersionPanel;
use SixtyEightPublishers\TracyGitVersion\Repository\LocalGitRepository;
use SixtyEightPublishers\TracyGitVersion\Repository\ExportedGitRepository;
use SixtyEightPublishers\TracyGitVersion\Repository\ResolvableGitRepository;
use SixtyEightPublishers\TracyGitVersion\Repository\RuntimeCachedGitRepository;
use SixtyEightPublishers\TracyGitVersion\Bridge\Tracy\Block\CurrentStateBlock;

# create a repository that reads from the .git directory:
$localGitRepository = LocalGitRepository::createDefault();

# create a repository that reads from a JSON export:
$exportedGitRepository = ExportedGitRepository::createDefault('/var/git-version/repository.json');

# combine there two repositories, if the .git directory is not accessible then try to read from the export file:
$resolvableGitRepository = new ResolvableGitRepository([$localGitRepository, $exportedGitRepository]);

# add runtime cache, commands results are stored so there are no duplicated calls to the real repository:
$cachedGitRepository = new RuntimeCachedGitRepository($resolvableGitRepository);

# add the panel into Tracy
Debugger::getBar()->addPanel(new GitVersionPanel($cachedGitRepository, [new CurrentStateBlock()]));
```

### Setup for Nette Framework

[](#setup-for-nette-framework)

The setup for Nette is more simple. Just add another extension into your neon configuration.

```
extensions:
    68publishers.tracy_git_version: SixtyEightPublishers\TracyGitVersion\Bridge\Nette\DI\TracyGitVersionExtension
    68publishers.tracy_git_version.export: SixtyEightPublishers\TracyGitVersion\Bridge\Nette\DI\TracyGitVersionExportExtension
```

The default name for the exported file is `%tempDir%/git-version/repository.json` but you can change it.

```
68publishers.tracy_git_version.export:
    export_filename: %tempDir%/my/custom/path.json
```

### Creating the export file

[](#creating-the-export-file)

The export file should be created by executing a script that is located in the composer's `bin` directory. The script is independent of the application so you must provide the filename of the exported file as an option.

```
$ vendor/bin/tracy-git-version export-repository --output-file /git-version/repository.json -vv
```

Advanced guide
--------------

[](#advanced-guide)

If you want to read more about repositories, how to extend them or how to add custom data into the panel, please see the [Advanced guide](docs/advanced-guide.md).

Contributing
------------

[](#contributing)

Before opening a pull request, please check your changes using the following commands

```
$ make init # to pull and start all docker images

$ make cs.check
$ make stan
$ make tests.all
```

License
-------

[](#license)

The package is distributed under the MIT License. See [LICENSE](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance41

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~219 days

Recently: every ~246 days

Total

6

Last Release

493d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/609005caba54757716c3c037c381376ab298714003da87c9e20aa8c501c97df8?d=identicon)[Jelen](/maintainers/Jelen)

---

Top Contributors

[![tg666](https://avatars.githubusercontent.com/u/24430186?v=4)](https://github.com/tg666 "tg666 (20 commits)")[![jelen07](https://avatars.githubusercontent.com/u/2346295?v=4)](https://github.com/jelen07 "jelen07 (1 commits)")

---

Tags

buildgitnettetracytracy-debuggertracy-panelvcsversionnettegittracy68publishersgit version

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/68publishers-tracy-git-version/health.svg)

```
[![Health](https://phpackages.com/badges/68publishers-tracy-git-version/health.svg)](https://phpackages.com/packages/68publishers-tracy-git-version)
```

###  Alternatives

[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[milo/vendor-versions

Bar with versions list of vendor libraries for Tracy

19155.1k5](/packages/milo-vendor-versions)[vasek-purchart/tracy-blue-screen-bundle

This bundle lets you use the Tracy's debug screen in combination with the the default profiler in your Symfony application.

1177.6k](/packages/vasek-purchart-tracy-blue-screen-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
