git 2.0.0 copy "git: ^2.0.0" to clipboard
git: ^2.0.0 copied to clipboard

outdated

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

example/example.dart

import 'package:git/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');
  }
}
50
likes
0
pub points
99%
popularity

Publisher

verified publisherkevmoo.com

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

path

More

Packages that depend on git