Egit - native interface to git

I’d like to announce a new git interface library for use by Erlang and Elixir.

https://hexdocs.pm/egit/readme.html

The library uses NIF bindings to the libgit2 library, and supports a useful set of git commands.

Regards,

Serge

16 Likes

It is great that it works with binaries out of the box, so you wouldn’t have to convert it to charlist in elixir.

Curious if you had any use cases in mind.

For example, if an Elixir Phoenix application managed a lot of documents, could this be a solution rather than using, say, CouchDB, for tracking changes? Seems it could be a great solution for keeping documents out of your application’s main git repository, but still be able to share access (with master or a branch) during development, even when offline.

I assume one would use a different package if the git repository was hosted on GitHub, because of things like access control.

Thank you for your work on this! Just a couple of weeks ago, I was working on an Elixir script to fetch a set of versioned files and commit them individually so that I could easily use GitHub’s UI to view diffs between releases. I looked for some libgit2 bindings at that point, but it looks like I was just a couple of weeks early! I ended up shelling out to the Git CLI, but I’d like to refactor to use this instead.