igor-kozhevnikov / cross-git
Set of console commands for git
Installs: 88
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 3
pkg:composer/igor-kozhevnikov/cross-git
Requires
- php: ^8.1
- igor-kozhevnikov/cross: ^1.1
Requires (Dev)
- phpstan/phpstan: ^1.10
- squizlabs/php_codesniffer: ^3.7
README
Set of console commands for git.
Install
This package depends on Cross package.
composer require igor-kozhevnikov/cross-git
Configuration
If your project doesn't have a cross.php config file in the root directory, just run the follow command.
./vendor/bin/cross cross:config
Add data as described below to the cross.php file.
<?php return [ 'plugins' => [ \Cross\Git\Plugin\Plugin::class, ], ];
To learn more about the available configurations, see the plugin and commands config files.
Commands
Adds all files to index
./vendor/bin/cross git:add
Config:
optionsApplied options
Commit changes with a message
./vendor/bin/cross git:commit
Config:
optionsApplied optionsmessage.handlersHandlers for a message
Push changes to the current branch
./vendor/bin/cross git:push
Config:
optionsApplied options
Add, commit and push
./vendor/bin/cross git:snapshot [options]
./vendor/bin/cross snap [options]
Options:
-a--addDon't add all files to index-c--commitDon't commit changes-p--pushDon't push changes
Config:
is_use_addIf the value is positive then theaddcommand will be usedis_use_commitIf the value is positive then thecommitcommand will be usedis_use_pushIf the value is positive then thepushcommand will be used
Create a feature branch
./vendor/bin/cross git:feature:create
Options:
-p--projectDefine a project name
Config:
projectProject nametitle.handlersHandlers for a title
Switch between feature branches
./vendor/bin/cross git:feature:switch
Options:
-p--projectDefine a project name
License
The Cross for Git is open-sourced software licensed under the MIT license.