The Groovy way to use Git.
Grgit is a way to interact with Git repositories with a fairly fluent Groovy API. JGit can get pretty tedious to use, especially in a scripting context.
Grgit will also be the base for a rewrite of the gradle-git plugin.
Grgit is published on JCenter and Maven Central. As of 3/30/2014, not all dependencies are in JCenter.
repositories {
jcenter()
mavenCentral()
}
dependencies {
compile 'org.ajoberstar:grgit:<version>'
}
Start at the main entry point class Grgit. This should link to all of the ways to call different operations.
For authentication, see AuthConfig.
The documentation home is here.
I've added most of the core operations so far, and you can see the issue tracker for planned features.
If an existing operation is missing an option, it most likely means one of the following things:
- I don't have a use case for it.
- I wasn't able to put together a test that could describe/validate the behavior of the option.
- JGit doesn't support it.
If you're interested in a change, please submit an issue (or even better a pull request with tests).
- Added
close()
method toGrgit
to release resources. - Support system properties for hardcoded credentials.
- Fix for some JNA issues when using ssh-agent.
- Added a bunch of new operations. See the Groovydoc for details.
- Initial release!