I have a git repository, I can see all the commits in a particular branch using git log branch-name. But I want to print the commit message, author and date of all commits with respect to a particular branch on an HTML page. Is there any solution for this?
How can I use jgit for this?
I don't know jgit, but in normal git you do that with the pretty option as
git log --pretty="%ci %an %s" branch-name
Where %ci is the date (ISO), %an is the commiter and %s is the subject.
EDIT
You can find more info in the log documentation, pretty format section : https://www.kernel.org/pub/software/scm/git/docs/git-log.html#_pretty_formats
git log --pretty=oneline commit1...commit2 > file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With