https://github.com/gavinning/git-commands
nodejs操作git | Execute git command using Node.js
https://github.com/gavinning/git-commands
git git-command git-commands node-git
Last synced: 3 months ago
JSON representation
nodejs操作git | Execute git command using Node.js
- Host: GitHub
- URL: https://github.com/gavinning/git-commands
- Owner: gavinning
- Created: 2018-07-03T03:06:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-03T03:16:43.000Z (almost 7 years ago)
- Last Synced: 2025-03-04T11:18:19.216Z (4 months ago)
- Topics: git, git-command, git-commands, node-git
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
git-commands
---
nodejs操作git
Execute git command using Node.js### Install
```sh
npm i git-commands --save
```### Usage
```js
const Git = require('git-commands')
const git = new Git({ reps: 'your git repository path' })
```
```js
// status
console.log( git.command('status') )// pull
console.log( git.command('pull') )// checkout
console.log( git.command('checkout master') )// push
console.log( git.command('push origin master') )
```