PHPackages                             jonpugh/composer-git-build - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jonpugh/composer-git-build

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

jonpugh/composer-git-build
==========================

Commands to get vendor and other ignored files into git,

12793PHP

Since Nov 7Pushed 8y agoCompare

[ Source](https://github.com/jonpugh/composer-git-build)[ Packagist](https://packagist.org/packages/jonpugh/composer-git-build)[ RSS](/packages/jonpugh-composer-git-build/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Composer Plugin: git-build
==========================

[](#composer-plugin-git-build)

The goal of this tool is to make it as easy as possible to commit your ignored directories to git.

Otherwise known as "artifact-building", this command will:

1. If --build-dir is specified, create a new repo and add your git remotes.
2. Pull in latest changes from current branch.
3. Automatically modify your .gitignore file, allowing vendor and other code to be added.
4. Commit all new code that is no longer ignored.
5. Create a new branch or tag.
6. Push the branch or tag to origin.

This plugin code was borrowed heavily from [Acquia's BLT](https://github.com/acquia/blt) command [`deploy` command](https://github.com/acquia/blt/blob/9.1.x/src/Robo/Commands/Deploy/DeployCommand.php).

Usage
-----

[](#usage)

1. Add to your composer project or globally:

    `composer require jonpugh/composer-git-build`

    -or-

    `composer global require jonpugh/composer-git-build`
2. Add to your .gitignore file:

    ```
    ## IGNORED IN GIT BUILD: ##
    # Items below this line will retained in artifacts built with the `composer git-build` command.

    ```
3. Add to your composer.json file:

    ```
    {
        "config": {
            "git.remotes": [
                "git@github.com:organization/build-repo.git",
                 "svn@acquia.com"
            ]
        }
    }
    ```

    The new built repo will have these remotes added automatically, and the tag or branch pushed to them.
4. Run `composer git-build`:

    ```
    Usage:
       git-build [options]

     Options:
       -b, --build-dir[=BUILD-DIR]    Directory to create the git artifact. Defaults to the composer working-dir option.
           --branch=BRANCH            Branch to create.
           --tag=TAG                  Tag to create.
       -m, --commit-msg=COMMIT-MSG    Commit message to use.
           --ignore-dirty             Allow committing even if git working copy is dirty (has modified files).
           --dry-run                  Build and commit to the repository but do not push.

    ```

Thanks
------

[](#thanks)

- @acquia/blt team for getting the ball rolling.
- @generalredneck for his .gitignore trick his session from Cornell DrupalCamp: [https://www.youtube.com/watch?v=WMd60xmQvlY&amp;feature=youtu.be](https://www.youtube.com/watch?v=WMd60xmQvlY&feature=youtu.be)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/10539fb9e887c35b626eba70c97dd9d53ba14e987d4f129b55a488664a834eca?d=identicon)[jonpugh](/maintainers/jonpugh)

---

Top Contributors

[![jonpugh](https://avatars.githubusercontent.com/u/106420?v=4)](https://github.com/jonpugh "jonpugh (42 commits)")

### Embed Badge

![Health badge](/badges/jonpugh-composer-git-build/health.svg)

```
[![Health](https://phpackages.com/badges/jonpugh-composer-git-build/health.svg)](https://phpackages.com/packages/jonpugh-composer-git-build)
```

###  Alternatives

[js-phpize/js-phpize

Convert js-like syntax to standalone PHP code.

23402.4k3](/packages/js-phpize-js-phpize)

PHPackages © 2026

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