@logotip4ik_/g
v2.2.3
Published
Script which will help you automate git flow
Downloads
2
Readme
g (shell command)
About
This command will help you to automate your git flow with ease
Installation
Install it globally to use it where you want
npm
$ npm i -g @logotip4ik_/g
yarn
$ yarn global add @logotip4ik_/g
Usage:
Available commands:
init
- initialize gitupdate
- create commit withupdate
message (ex."update: ..."
)fix
- create commit withfix
message (ex."fix: ..."
)log
- log to console current branch, last 5 commits and not staged filessync
- pull and push from origin, accepts the same arguments as pullpull
- pull from origin
can accept this arguments:g pull
- will pull from origin and current branchg pull v5
- will pull from origin andv5
branchg pull fake-origin v5
- will pull fromfake-origin
andv5
branch
push
- push to the origin, accepts the same arguments as pull
Examples
init with message and
v2
branch name:$ g init v2 -m just for example
what it gonna do:
$ git init -b v2 $ git add . $ git commit -m "init: <your message passed via -m flag>" $ git push origin <your current branch>
create an update with message and push to origin:
$ g -m just for example -i ./that/dummy/file.js -ph
what it gonna do:
$ git add <files specified by -i flag> ./that/dummy/file.js $ git commit -m "update: <your message passed via -m flag>" $ git push origin <current branch>
create fix with a message and push to
v3
branch:$ g -m just for example -i ./that/dummy/file.js -ph v3
what it gonna do:
$ git add . $ git commit -m "fix: <your message passed via -m flag>" $ git push origin v3