Looking to hire Laravel developers? Try LaraJobs

laravel-git-admin maintained by alanmjc

Description
Laravel Artisan commands to automate common Git sync workflows.
Last update
2026/07/28 19:59 (dev-main)
License
Links
Downloads
18

Comments
comments powered by Disqus

Laravel Git Admin

Composer package that provides Artisan commands for common Git synchronization workflows.

Installation

composer require alanmjc/laravel-git-admin:^0.1.0

Compatibility:

  • Laravel 8.83+
  • Laravel 9, 10, 11, and 12
  • PHP 8.0+

Laravel package auto-discovery registers the provider automatically.

Commands

app:sync-git

Synchronizes the current branch with remote and rebases on a base branch.

php artisan app:sync-git
php artisan app:sync-git desarrollo
php artisan app:sync-git desarrollo --yes

Arguments and options:

  • branch (default: desarrollo): base branch used for rebase.
  • --yes: skips confirmation for force push.

app:sync-branches

Iterates development branches, merges each into desarrollo, and pushes. By default, it uses the branches defined in the published configuration. You can also provide one or more branches directly when running the command.

php artisan app:sync-branches
php artisan app:sync-branches alan luis
php artisan app:sync-branches alan,luis

Command arguments take precedence over sync_branches.branches. Branches may be provided as separate arguments or as a comma-separated list.

Publish configuration to customize branches and main target branch:

php artisan vendor:publish --tag=git-admin-config

Generated config file:

<?php

return [
  'sync_branches' => [
    'main_branch' => 'desarrollo',
    'branches' => ['alan', 'luis', 'mauricio', 'vasni'],
  ],
];

Local development

Run this in the package root:

composer dump-autoload

To test in a Laravel app using path repository:

{
  "repositories": [
    {
      "type": "path",
      "url": "../git-admin"
    }
  ]
}

Then require it:

composer require alanmjc/laravel-git-admin:dev-main