guidovv/branch-switcher

This package is abandoned and no longer maintained. No replacement package was suggested.

A package to switch between branches while in the browser

dev-master 2020-11-13 14:14 UTC

This package is auto-updated.

Last update: 2021-10-13 16:15:00 UTC


README

BranchSwitcher is a package that lets you switch Git branches via the browser
BranchSwitcher Screenshot

Requires

php: ^7.3
laravel/framework: ^6.18


Installation

Require this package with composer

composer require guidovv/branch-switcher

Usage

Enabling / disabling

By default this package is enabled on the local and testing environment.
This can be overwritten by publishing the config and changing it to fit your needs.

Toggling

By default the branch switcher is hidden on the page.
You can toggle it by pressing ctrl + b.


Default commands

This package comes with a few default commands that are shown to the user.
By publishing the config you can control what commands are being shown to the user and which are checked by default.

'commands' => [
    'npm install' => [
        'default' => 1,
    ],
    'composer install' => [
        'default' => 1,
    ],
    'php artisan migrate' => [
        'default' => 1,
    ],
    'php artisan migrate:fresh' => [
        'default' => 1,
    ],
    'php artisan db:seed' => [
        'default' => 0,
    ],
]

Publishing

To publish the config run:

php artisan vendor:publish --tag=branch-switcher-config

To publish the resources (JS/CSS) run:

php artisan vendor:publish --tag=branch-switcher-resources

Dependencies

None


License

MIT