Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/desktop/dugite
Elegant bindings for working with Git in your Node applications
https://github.com/desktop/dugite
dugite-native git nodejs
Last synced: 7 days ago
JSON representation
Elegant bindings for working with Git in your Node applications
- Host: GitHub
- URL: https://github.com/desktop/dugite
- Owner: desktop
- License: mit
- Created: 2016-08-24T04:59:27.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T12:46:32.000Z (2 months ago)
- Last Synced: 2024-10-29T15:48:13.343Z (about 2 months ago)
- Topics: dugite-native, git, nodejs
- Language: TypeScript
- Homepage:
- Size: 1.54 MB
- Stars: 462
- Watchers: 36
- Forks: 149
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-list - dugite
README
# Dugite - JS bindings for Git
This project provides bindings for Node applications to interact with Git repositories, using the same command line interface that core Git offers. Development is primarily driven by Git-related projects at GitHub such as [GitHub Desktop](https://github.com/desktop/desktop).
The source is in TypeScript, but can be consumed by any JavaScript application.
### Getting Started
Add it to your project:
```
> npm install dugite
```or
```
> yarn add dugite
```Then reference it in your application:
```js
import { GitProcess, GitError, IGitResult } from 'dugite'const pathToRepository = 'C:/path/to/git/repository/'
const result = await GitProcess.exec(['status'], pathToRepository)
if (result.exitCode === 0) {
const output = result.stdout
// do some things with the output
} else {
const error = result.stderr
// error handling
}
```### Features
- make it easy to work with Git repositories
- use the same commands as you would in a shell
- access to the full set of commands, options and formatting that Git core uses
- access to the latest features of Git### Supported Platforms
- Windows 7 and later
- macOS 10.9 and up
- Linux (tested on Ubuntu Precise/Trusty and Fedora 24)### Status
This project is under active development for Git-related projects at GitHub. This will stabilize as this library gets more usage in production, and is open to external contributions that align with the project's goals.
If you are interested in getting involved with this project, refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file for instructions and the [documentation](./docs/) sections for more information about the project.
### Roadmap
As this is under active development, the roadmap is also subject to change. Some ideas:
- authentication support in-the-box
- make environment setup easier to override
- API additions for common tasks such as parsing output
- error handling improvements