FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Cannot create a new branch · Issue #391 · nodegit/nodegit · GitHub

Repository navigation

Cannot create a new branch #391

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.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL