0.6.3 • Published 5 months ago

git-auto-merge v0.6.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

English | 中文文档

Example

Push

Quick

git-auto-push-quick.gif

with the option

git-auto-push.gif

Merge

Quick

git-auto-merge-quick.gif

with the option

git-auto-merge.gif

Introduction

  1. Execute commands to automatically push code to remote servers, no more manual add, commit, push;
  2. Execute the command to directly select the merge code to other branches and push it to the remote, automatically cutting back to the original branch

Install

Can be installed locally or global:

# yarn
yarn global add git-auto-merge

#npm
npm install git-auto-merge -g

DOCS

Usage: git-auto <command> [options]

Options:
  -h, --help                             Display help information
  -v, --version                          output the current version
  --debug                                View detailed output
  -m, --commit <commit>                  [push] Add commit information
  --part                                 [push] Partial submission of documents only
  -f, --force                            [push] force update
  -b, --branch <branch...>               [merge] Branches to be merged, multiple separated by spaces
  -l, --latest                           [publish] Publish the latest patch version
  -p, --publish-branch <publish-branch>  [publish] Fill in a branch name and publish to npm
  -t, --tag [tag-name]                   [publish] Create a tag when publishing, you can write the name after a space

Commands:
  init                                   Add the script command under package.json
  push                                   Push the current branch to remote
  merge                                  Merge the current branch to another remote branch
  publish                                Publish code to npm

Usage

Code Push: git-auto push or git-auto push -m 'feat(src): logic'

Code Merge: git-auto merge or git-auto merge -m 'feat(src): logic' -b uat sit

Code Publish: git-auto publish or git-auto publish -m 'feat(src): logic' -b uat sit -p master -lt

View help: git-auto -h

Optional

Add Command

Executing the initialization git-auto init will automatically add the following to package.json for you.

{
  "scripts": {
    "gp": "git-auto push",
    "gm": "git-auto merge"
  }
}

Add Configuration

Create gm.config.js in the root of the project:

module.exports = {
  merge: {
    /** Mergeable branches, read all branches if not written by default */
    branch: [],
    /** Default merged branches */
    default: [],
  },
  publish: {
    /** Publish branch */
    branch: 'master',
    /** auto create Tag: v1.0.0 */
    tag: true,
    /** Automatic release of the latest patch version at release time */
    latest: true
  },

  /** Log prefix */
  logPrefix: '',

  /** Default commit information */
  commitDefault: {
    type: 'feat',
    module: 'index',
    message: 'logic',
  },

  /** Execute the callback after the merge is complete */
  callback: (commandName: 'push' | 'merge' | 'publish') => {},
}
0.6.3

5 months ago

0.5.0

2 years ago

0.5.1

2 years ago

0.6.2

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.45

2 years ago

0.0.44

2 years ago

0.0.43

2 years ago

0.0.42

2 years ago

0.0.41

2 years ago

0.0.40

2 years ago

0.0.39

2 years ago

0.0.38

2 years ago

0.0.37

2 years ago

0.0.36

2 years ago

0.0.35

2 years ago

0.0.34

2 years ago

0.0.33

2 years ago

0.0.32

2 years ago

0.0.31

2 years ago

0.0.30

2 years ago

0.0.29

2 years ago

0.0.28

2 years ago

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago