-
Notifications
You must be signed in to change notification settings - Fork 699
Closed
Description
I am trying to create a new branch in my repo, however I am getting an error about a callback not existing. This is using version 0.2.7 from NPM
Git = require('nodegit');
scope = {}
Git.Repository.open("./")
.then(function(repo) {
scope.repo = repo;
return repo.getMasterCommit();
})
.then(function(masterCommit) {
scope.masterCommit = masterCommit;
return Git.Branch.create(scope.repo, "new-branch", scope.masterCommit, true)
})
.then(function(branch) {
console.log(branch.toString())
})
.catch(function(err) {
console.log(err.toString())
})
This results in the output
Error: Callback is required and must be a Function.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels