simple-git
Advanced tools
Comparing version 0.6.0 to 0.7.0
{ | ||
"name": "simple-git", | ||
"description": "Simple GIT interface for node.js", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"author": "Steve King <steve@mydev.co>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -42,2 +42,4 @@ # Simple Git | ||
`.checkoutBranch(branchName, startPoint, handlerFn)` checks out a new branch from the supplied start point | ||
`.checkoutLatestTag(handlerFn)` convenience method to pull then checkout the latest tag | ||
@@ -44,0 +46,0 @@ |
@@ -153,2 +153,16 @@ (function() { | ||
}; | ||
/** | ||
* Check out a remote branch | ||
* | ||
* @param {String} name of branch | ||
* @param {String} start point(e.g origin/development) | ||
* @param {Function} [then] | ||
*/ | ||
Git.prototype.checkoutBranch = function(branchName, startPoint, then) { | ||
return this._run('git checkout -b "' + branchName + '" "' + startPoint + '"', function(err, data) { | ||
then && then(err, !err && this._parseCheckout(data)); | ||
}); | ||
}; | ||
@@ -155,0 +169,0 @@ /** |
16965
387
94