Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project provides bindings for Node applications to interact with Git reposi

The source is in TypeScript, but can be consumed by any JavaScript application.

## Migrating from 2.x to 3.x

See the migration guide in the [3.0.0 release](https://github.com/desktop/dugite/releases/tag/v3.0.0) for details on breaking changes and how to update your code.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about linking directly to the migration guide?

Suggested change
See the migration guide in the [3.0.0 release](https://github.com/desktop/dugite/releases/tag/v3.0.0) for details on breaking changes and how to update your code.
See the [migration guide in the 3.0.0 release](https://github.com/desktop/dugite/releases/tag/v3.0.0#:~:text=Migration%20guide) for details on breaking changes and how to update your code.


### Getting Started

Add it to your project:
Expand All @@ -21,17 +25,15 @@ or
Then reference it in your application:

```js
import { GitProcess, GitError, IGitResult } from 'dugite'
import { exec } 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
const { exitCode, stdout, stderr } = await exec(['status'], pathToRepository)
if (exitCode === 0) {
console.log(stdout)
} else {
const error = result.stderr
// error handling
console.error(stderr)
}
```

Expand Down