I am using the below code to commit my changes.
CommitCommand commitCommand = git.commit();
commitCommand.setMessage("My change");
commitCommand.setAuthor(name, name + "@xyz.com");
commitCommand.call();
I want to know the commit id of this change. Because there can be a || process committing between the time I get the latest commit id and this particular commit. So to get the changes happening in this particular commit I need the commit id of the above commit. AFAIK CommitCommand does not have a getID() API.