+7
-7
@@ -14,5 +14,5 @@ 'use strict'; | ||
| if (options) gitsimple.push(remote, branch, options, function () { | ||
| return "add commit and push done"; | ||
| console.log("add commit and push done"); | ||
| });else gitsimple.push(remote, branch, function () { | ||
| return "add commit and push done"; | ||
| console.log("add commit and push done"); | ||
| }); | ||
@@ -27,5 +27,3 @@ }); | ||
| return gitsimple.pull(remote, branch, function (error, success) { | ||
| if (error) console.log(error); | ||
| return gitsimple.pull(remote, branch, function () { | ||
| console.log('pull done'); | ||
@@ -40,4 +38,6 @@ }); | ||
| gitsimple.addRemote('origin', repo, function () { | ||
| gitsimple.push('origin', 'master', '-u', function () { | ||
| return "successful init repository"; | ||
| gitsimple.push('origin', 'master', '-u', function (err, res) { | ||
| if (err) console.error(err);return; | ||
| console.log("successful init repository"); | ||
| }); | ||
@@ -44,0 +44,0 @@ }); |
+1
-1
| { | ||
| "name": "gitcommon", | ||
| "version": "1.0.3", | ||
| "version": "1.0.4", | ||
| "description": "A simple git cli tool", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+12
-12
@@ -8,9 +8,9 @@ const gitsimple = require('simple-git')('.'); | ||
| if (options) | ||
| gitsimple.push(remote, branch, options, () => { | ||
| return "add commit and push done"; | ||
| }) | ||
| else | ||
| gitsimple.push(remote, branch, () => { | ||
| return "add commit and push done"; | ||
| }) | ||
| gitsimple.push(remote, branch, options, () => { | ||
| console.log("add commit and push done"); | ||
| }) | ||
| else | ||
| gitsimple.push(remote, branch, () => { | ||
| console.log("add commit and push done"); | ||
| }) | ||
| }); | ||
@@ -22,5 +22,3 @@ | ||
| function pull(remote = "origin", branch = "master") { | ||
| return gitsimple.pull(remote, branch, (error, success) => { | ||
| if (error) console.log(error) | ||
| return gitsimple.pull(remote, branch, () => { | ||
| console.log('pull done'); | ||
@@ -35,4 +33,6 @@ }); | ||
| gitsimple.addRemote('origin', repo, () => { | ||
| gitsimple.push('origin', 'master', '-u', () => { | ||
| return "successful init repository"; | ||
| gitsimple.push('origin', 'master', '-u', (err, res) => { | ||
| if (err) console.error(err);return; | ||
| console.log("successful init repository"); | ||
| }) | ||
@@ -39,0 +39,0 @@ }) |
8828
0.74%