rust-lang / git2-rs

libgit2 bindings for Rust
https://docs.rs/git2
Apache License 2.0
1.64k stars 380 forks source link

Example for commit #1000

Closed c-git closed 8 months ago

c-git commented 8 months ago

Add comment indicating that there is more content than init, specifically commit.

I did this because I spent quite a bit of time trying to understand how to commit. I read the docs but that alone wasn't quite enough to get me on my way as I'm very new to this library. I previously looked at this example but only needed how to init a repo and missed the example of how to commit that it included. If I understood it well enough I'd create an new file in examples for commit how there is a file for the other functions to improve discoverability or add one to the documentation for commit. Maybe one day if I understand better I'll come back and do that but or now adding this to the description of this example to help the next person. Alternatively maybe we could point to this example from the docs, if that is easy.