Questions tagged [nodegit]

nodegit is a collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.

NodeGit is a collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.

Official Website

API Documentation

110 questions
2
votes
2 answers

Nodegit How can I get new branch list?

open(o.localPath).then(function (repo) { repository = repo; return repo.fetchAll(credentials); }).then(function () { return repository.getReferenceNames(Git.Reference.TYPE.LISTALL); }).then(function (arrayString) { …
Jason Wong
  • 216
  • 3
  • 14
2
votes
2 answers

Getting git repository url with nodegit

i'm using the nodegit library to get all commits from my repository, and i want to get general information from the local repository as for example: the url from the remote repository (Ex: https://github.com/nodegit/nodegit/) Is it possible?
2
votes
0 answers

How do I pull all branches with NodeGit?

I´m trying to do an update of my local repository. According to the documentation, doing a fetchAll fetches all branches from the remote, which is what I´m currently doing. There is nothing like pullAll which automatically merges those remotes with…
Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
2
votes
1 answer

NodeGit how to get last commit id of another branch?

I have two branches checked out of my system Master and Dev. My Working directory is Master from Master I want to push/merge file to dev after knowing the difference. For say in Master I am working abc.txt file and I want to check the difference…
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59
2
votes
1 answer

How to sort tags by date with nodegit?

How can we get the tags from a git repository and sort them by their related commit date ? The Tag.list only returns names and Tag.lookup needs an OID so how to we fill in the missing part of converting the tag name to a Tag or tag id ?
Anna B
  • 5,997
  • 5
  • 40
  • 52
2
votes
0 answers

download the code of a particular tag of a git repo using Node

I want to download the source code of a private git repo hosted on github for only a particular tag. As far as I can tell there's an option of using git clone --depth=1. I suppose this is the answer on how to use tags with this. Now I want to do…
0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184
2
votes
1 answer

Return after all "on" events are called inside a JS promise

In Node.js, using NodeGit. I'm using a function similar to this inside a POST Express.js route. This route should get the commits between endCommit and startCommit: router.post('/getLog', function(req, res, next) { var logData = []; …
adelriosantiago
  • 7,762
  • 7
  • 38
  • 71
2
votes
0 answers

Is there a nodegit equivalent to `$ git add -N *` and `$ git diff --name-only`?

Just like the title says. I've been looking for a while but haven't found any leads.
Ethan Davis
  • 1,209
  • 1
  • 14
  • 21
2
votes
1 answer

"C compiler cannot create executables" in libssh2 during npm install

I got the following error during npm install of nodegit: > nodegit@0.15.1 preinstall /home/mhu/nodegit > node lifecycleScripts/preinstall [nodegit] Running pre-install script [nodegit] npm@2 installed, pre-loading required packages [nodegit]…
Calvin Hu
  • 3,595
  • 4
  • 18
  • 23
2
votes
1 answer

How do I fix this gyp rebuild error when trying to install nodegit?

I'm trying to install the nodegit module on my Windows 7 machine. Here are the relevant versions of some things I have installed, let me know if anything else would be helpful: Windows 7 python v2.7 node v4.2.0 (I switched to 32-bit…
user3897392
  • 397
  • 2
  • 5
  • 22
2
votes
2 answers

running npm install unbuilds global npm

I have a project that depends on nodegit. When I run npm install -g . I get this output at some point: When npm finishes installing, I lose access to it in the path: I end up having to run 'n', to change to a previous version of node, then run 'n'…
André Alçada Padez
  • 10,987
  • 24
  • 67
  • 120
1
vote
1 answer

How to use GitHub SSH key for private/public repositories in a Nodejs for (clone, pull, push, and commit)

I tried using Nodegit in the same method, but I got an error message saying "Clone.clone, stack: Error: Method clone has caused an error." or "Github authentitation failed." I have tried it but it gives me below error message Error: Method clone…
1
vote
1 answer

Errors installing nodegit

I am trying to get my head around setting up nodejs and realise that i need to link to a git repository. I am a real newbe and previously only used html css and PHP. scanning the web I found that nodegit was a possible solution. it said to…
1
vote
1 answer

NodeGit - Cannot read property 'TYPE' of undefined

I'm using electron and I have the following in my main process import * as Git from "nodegit"; console.log("NodeGit version is:", Git.version); console.log("The HARD reset type has the id", Git.Reset.TYPE.HARD); When I yarn start as usual, I get…
Artur Kovacs
  • 141
  • 5
1
vote
0 answers

How to create a Git Repo URL for others to clone in NodeJS?

I am trying to setup a central repository in my local, running on NodeJS, where others can access, create their own git repository, clone, commit, push, pull from their git repository. The idea is more like to setup a local Github running on NodeJS.…