API for pushing/fetching objects to/from git repositories
Provides simple API for interacting with git repositories remotely. For now only a subset of the packfile protocol and file/ssh/git transports are supported.
npm install git-remote
Consider that we are working from the same context as shown in git-core usage
connect = ;// first step is to connect to some remote:remote = ;// orremote = ;// orremote =;// fetch datafetch = remote;fetch;fetch;fetch;// It is possible to set the maximum history depth. For example, if all you// need is the tree pointed by a tag or branch:fetch = remote;fetchmaxDepth = 1;fetch;fetch
For now, both the git-core/git-remote packages work completely on memory, so don't use this package to retrieve a large amount of objects. If you have enough memory, you can see what I mean by opening node REPL and pasting this:
connect = ;remote = ;fetch = remote;// never forget maxDepth fetching from big repositories!fetchmaxDepth = 1;fetch;fetch;fetch;
Inspect the process using 'top' or some other tool. The memory usage should go past 400mb.