Giter Club home page Giter Club logo

nodegit-lfs's Introduction

NodeGit LFS

Nodegit LFS is an extension library used to augment NodeGit with the capability to use git lfs via the command line.

To use this package, you must have git and git lfs installed.

This project is new, and is highly volatile. It should be noted that any subsequesnt releases may have breaking changes for the foreseeable future.

How to get started

NodeGit is a peer dependency of the NodeGit LFS package, so you should make sure to install NodeGit before NodeGit LFS.

To install NodeGit run:

yarn add nodegit

To install NodeGit LFS run:

yarn add nodegit-lfs

Once installed, you only need to bootstrap NodeGit LFS once:

const nodegit = require('nodegit');
const addLfs = require('nodegit-lfs');

// Call the function returned from nodegit-lfs with nodegit as a parameter
// and you are good to go!
addLfs(nodegit);

// After nodegit has been augmented you can use LFS via the LFS object
nodegit.LFS.register()
  .then(() => {
    console.log('The LFS filter has been registered!');
  });

Building from source

Clone the repo:

git clone https://github.com/axosoft/nodegit-lfs

Once cloned:

cd nodegit-lfs
yarn

nodegit-lfs's People

Contributors

alexaxs avatar cjhoward92 avatar dependabot[bot] avatar emmax86 avatar ianhattendorf avatar implausible avatar mohseenrm avatar trevorforrey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nodegit-lfs's Issues

Why does nodegit-lfs require git and git-lfs installed?

Hello,

I use nodegit for my NodeJS project and would like to add now Git LFS support. So I found nodegit-lfs and the description states:

Nodegit LFS is an extension library used to augment NodeGit with the capability to use git lfs via the command line.
To use this package, you must have git and git lfs installed.

Can anyone explain me the purpose behind this requirement? Nodegit itself works with libgit2, but to use Git LFS I need git and git lfs installed?

Does anyone know how for example GitKraken has solved this to fulfill their Git LFS support? Thanks a lot!

Update NPM Package

I am having significant issues trying to install this package using yarn behind corporate firewall due to node-gyp downloading node source files. Not sure 100% if it would solve my problems but I don't have the same issues with npm.

Currently I am able to make it work if I build it from source.

Cant install. gyp: No Xcode or CLT version detected!

macOS 11.4, macbook air M1, node v10.24.0 via nvm, terminal (iTerm2) running under rosetta

Console output:

➜  backend (master) npm i nodegit-lfs                                                                                      ✭ ✱

> [email protected] install /Users/marshal/projects/sudoku/backend/node_modules/node-pty
> node scripts/install.js

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/marshal/.nvm/versions/node/v10.24.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 20.5.0
gyp ERR! command "/Users/marshal/.nvm/versions/node/v10.24.0/bin/node" "/Users/marshal/.nvm/versions/node/v10.24.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/marshal/projects/sudoku/backend/node_modules/node-pty
gyp ERR! node -v v10.24.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/marshal/projects/sudoku/backend/package.json'
npm WARN backend No description
npm WARN backend No repository field.
npm WARN backend No README data
npm WARN backend No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/marshal/.npm/_logs/2021-06-14T10_32_31_110Z-debug.log

Full log file: 2021-06-14T10_32_31_110Z-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.