https://github.com/kevmoo/git
A dart wrapper around the git command line binary
https://github.com/kevmoo/git
dart git
Last synced: about 2 months ago
JSON representation
A dart wrapper around the git command line binary
- Host: GitHub
- URL: https://github.com/kevmoo/git
- Owner: kevmoo
- License: bsd-2-clause
- Created: 2014-02-15T20:02:54.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T20:11:55.000Z (4 months ago)
- Last Synced: 2025-05-16T18:05:59.074Z (about 2 months ago)
- Topics: dart, git
- Language: Dart
- Homepage: https://pub.dev/packages/git
- Size: 12.4 MB
- Stars: 131
- Watchers: 4
- Forks: 22
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pub.dev/packages/git)
[](https://github.com/kevmoo/git/actions/workflows/ci.yml)Exposes a Git directory abstraction that makes it easy to inspect and manipulate
a local Git repository.```dart
import 'package:git/git.dart';
import 'package:path/path.dart' as p;Future main() async {
print('Current directory: ${p.current}');if (await GitDir.isGitDir(p.current)) {
final gitDir = await GitDir.fromExisting(p.current);
final commitCount = await gitDir.commitCount();
print('Git commit count: $commitCount');
} else {
print('Not a Git directory');
}
}
```