PHPackages                             totten/git-scan - 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. totten/git-scan

ActiveLibrary

totten/git-scan
===============

CLI tool for scanning/updating git repos

2026-01-29(3mo ago)332.8k↓75%7[3 issues](https://github.com/totten/git-scan/issues)AGPL-3.0-or-laterPHPPHP &gt;=7.3.0CI passing

Since Jan 3Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/totten/git-scan)[ Packagist](https://packagist.org/packages/totten/git-scan)[ RSS](/packages/totten-git-scan/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (4)Dependencies (5)Versions (27)Used By (0)

git-scan
========

[](#git-scan)

Git-scan is designed for users who have many overlapping git repositories -- for example, developers who work with "composer" or "drush-make" may build out working directories which include half a dozen or more repos. Key features:

- Zero configuration
- Works with deeply nested repositories
- Filters and displays repositories based on their status ("*git scan status*")
- Performs safe (fast-forward) updates on repositories when valid ("*git scan update*")
- Executes custom commands ("*git scan foreach -c '...'*")
- Agnostic to the build system (eg works equally well with "composer", "drush-make", and manually-written build scripts)
- Agnostic to the branch/submission/review process (eg works with personal read/write repos as well as GitHub repos that require pull-requests)

Limitations:

- IO-intensive -- Performs filesystem scan and does not cache results

The concepts and use-case are described in more depth in the blog post, [Developer Tip: Managing Multiple Git Repos](https://civicrm.org/blogs/totten/developer-tip-managing-multiple-git-repositories)

Download
========

[](#download)

git-scan is distributed in PHAR format, which is a portable executable file (for PHP). It should run on most Unix-like systems where PHP 7.2+ is installed.

Simply download [git-scan](https://download.civicrm.org/git-scan/git-scan.phar) to somewhere in your [PATH](https://en.wikipedia.org/wiki/PATH_%28variable%29), and make it executable, eg.

```
cd /usr/local/bin  # or wherever else you want it to go, such as ~/bin
sudo curl -LsS https://download.civicrm.org/git-scan/git-scan.phar -o git-scan
sudo chmod +x git-scan
```

Examples
========

[](#examples)

```
me@localhost:~/drupal-demo$ git scan st
[[ Finding repositories ]]
[[ Checking statuses ]]
 5/5 [============================] 100%
[[ Results ]]

+--------+---------------------------------------------------------+--------------+---------------------+
| Status | Path                                                    | Local Branch | Remote Branch       |
+--------+---------------------------------------------------------+--------------+---------------------+
|     S  | drupal-demo/sites/all/modules/civicrm                   | master       | upstream/master     |
|        | drupal-demo/sites/all/modules/civicrm/drupal            | 7.x-master   | upstream/7.x-master |
|  FMN   | drupal-demo/sites/all/modules/civicrm/packages          | master       | upstream/master     |
|        | drupal-demo/sites/all/modules/contrib/civicrm_developer | master       | origin/master       |
+--------+---------------------------------------------------------+--------------+---------------------+
[F] Fast-forwards are not possible
[M] Modifications have not been committed
[N] New files have not been committed
[S] Stash contains data

me@localhost:~/drupal-demo$ git scan up
[[ Finding repositories ]]
[[ Fast-forwarding ]]
Fast-forward drupal-demo/sites/all/modules/civicrm (master  new
```

Configuration
=============

[](#configuration)

You may optionally create a file, `~/.git-scan.json`, to customize the behavior. Supported options:

- `excludes`: An array of path names to skip when scanning (e.g. `.svn` or `.hg`).

Development: Unit-Tests
=======================

[](#development-unit-tests)

If you have [phpunit 8.x / 9.x](http://phpunit.de/), then you can run the test suite. For example:

```
$ composer create-project totten/git-scan
$ cd git-scan
$ phpunit
PHPUnit 8.5.15 by Sebastian Bergmann.

Configuration read from /home/me/src/git-scan/phpunit.xml.dist

.................................................

Time: 2 seconds, Memory: 6.50Mb

OK (49 tests, 121 assertions)

```

The helper `./scripts/test.sh` is a small wrapper which will download and execute a suitable version of `phpunit`.

Development: Build (PHAR)
=========================

[](#development-build-phar)

If you are developing new changes to `git-scan` and want to create a new build of `git-scan.phar` from source, you should have [`git`](https://git-scm.com), [`composer`](https://getcomposer.org/), and [`box`](http://box-project.github.io/box2/).

```
$ git clone https://github.com/totten/git-scan
$ cd git-scan
$ composer install
$ which box
/usr/local/bin/box
$ php -dphar.readonly=0 /usr/local/bin/box build

```

The helper `./scripts/build.sh` is small wrapper which will download and execute a suitable version of `box`.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance78

Regular maintenance activity

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 97.3% 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 ~200 days

Recently: every ~501 days

Total

23

Last Release

105d ago

PHP version history (3 changes)2014-01-03PHP &gt;=5.3.3

2022-07-15PHP &gt;=7.2

2025-04-30PHP &gt;=7.3.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1336047?v=4)[Tim Otten](/maintainers/totten)[@totten](https://github.com/totten)

---

Top Contributors

[![totten](https://avatars.githubusercontent.com/u/1336047?v=4)](https://github.com/totten "totten (178 commits)")[![balupton](https://avatars.githubusercontent.com/u/61148?v=4)](https://github.com/balupton "balupton (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![jonpugh](https://avatars.githubusercontent.com/u/106420?v=4)](https://github.com/jonpugh "jonpugh (1 commits)")[![seamuslee001](https://avatars.githubusercontent.com/u/6799125?v=4)](https://github.com/seamuslee001 "seamuslee001 (1 commits)")

### Embed Badge

![Health badge](/badges/totten-git-scan/health.svg)

```
[![Health](https://phpackages.com/badges/totten-git-scan/health.svg)](https://phpackages.com/packages/totten-git-scan)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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