widgetbook_git 2.1.0 copy "widgetbook_git: ^2.1.0" to clipboard
widgetbook_git: ^2.1.0 copied to clipboard

discontinuedreplaced by: widgetbook

Git command line wrapper. Exposes a Git directory abstraction that makes it easy to inspect and manipulate a local Git repository.

Pub Package CI

A fork of the git package which includes an API for the git diff command.

Exposes a Git directory abstraction that makes it easy to inspect and manipulate a local Git repository.

import 'package:widgetbook_git/widgetbook_git.dart';
import 'package:path/path.dart' as p;

Future<void> 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');
  }
}
0
likes
120
points
88
downloads

Publisher

unverified uploader

Weekly Downloads

Git command line wrapper. Exposes a Git directory abstraction that makes it easy to inspect and manipulate a local Git repository.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-2-Clause (license)

Dependencies

collection, path

More

Packages that depend on widgetbook_git