gflow-cli

0.0.5 • Public • Published

gflow-cli

NPM version npm download license

A git flow cli using nodejs, which improve your efficiency.

gitflow png

Installation

npm i gflow-cli -g

Usage


FEATURE

👉 gflow feature start <feature_name>

This will do follows:

- git checkout develop
- git pull
- git checkout -B feature/<feature_name>
- git push

👉 gflow feature finish <feature_name>

This will do follows:

- git checkout develop
- git pull
- git merge feature/<feature_name>

👉 gflow feature publish <feature_name>

This will do follows:

- git checkout develop
- git pull
- git merge feature/<feature_name>
- git push
- git push origin :feature/<feature_name>

⚠️ This will delete the remote branch feature/<feature_name>, but do not delete local feature branch.


RELEASE

👉 gflow release start <release_name>

This will do follows:

- git checkout develop
- git pull
- git checkout -B release/<release_name>
- git push

👉 gflow release finish <release_name>

This will do follows:

- git checkout master
- git pull
- git merge release/<release_name>

- git tag <release_name> master -f

- git checkout develop
- git pull
- git merge release/<release_name>
  • This will add a tag base master, named <release_name>, you can use --no-tag to avoid it.
  • You can also using -t <tag_name> or --tag <tag_name> to replace <release_name>.

👉 gflow release publish <release_name>

This will do follows:

- git checkout master
- git pull
- git merge release/<release_name>
- git push

- git tag <release_name> master -f
- git push --tags

- git checkout develop
- git pull
- git merge release/<release_name>
- git push
- git push origin :release/<release_name>

⚠️

  • This will delete the remote branch release/<release_name>, but do not delete local release branch.
  • This will add a tag base master, named <release_name>, you can use --no-tag to avoid it.
  • You can also using -t <tag_name> or --tag <tag_name> to replace <release_name>.

HOTFIX

👉 gflow hotfix start <name>

This will do follows:

- git checkout master
- git pull
- git checkout -B hotfix/<name>
- git push

👉 gflow hotfix finish <name>

This will do follows:

- git checkout master
- git pull
- git merge hotfix/<name>

- git tag <name> master -f

- git checkout develop
- git pull
- git merge hotfix/<name>
  • This will add a tag base master, named <hotfix_name>, you can use --no-tag to avoid it.
  • You can also using -t <tag_name> or --tag <tag_name> to replace <hotfix_name>.

👉 gflow hotfix publish <name>

This will do follows:

- git checkout master
- git pull
- git merge hotfix/<name>
- git push

- git tag <name> master -f
- git push --tags

- git checkout develop
- git pull
- git merge hotfix/<name>
- git push
- git push origin :release/<name>

⚠️

  • This will delete the remote branch hotfix/<name>, but do not delete local branch.
  • This will add a tag base master, named <hotfix_name>, you can use --no-tag to avoid it.
  • You can also using -t <tag_name> or --tag <tag_name> to replace <hotfix_name>.

BUGFIX

👉 gflow bugfix start <name>

This will do follows:

- git checkout develop
- git pull
- git checkout -B bugfix/<name>
- git push

👉 gflow bugfix finish <name>

This will do follows:

- git checkout develop
- git pull
- git merge bugfix/<name>

👉 gflow bugfix publish <name>

This will do follows:

- git checkout develop
- git pull
- git merge bugfix/<name>
- git push
- git push origin :bugfix/<name>

⚠️ This will delete the remote branch bugfix/<name>, but do not delete local branch.

Package Sidebar

Install

npm i gflow-cli

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

50.8 kB

Total Files

5

Last publish

Collaborators

  • fengxianqi