Before we start, we need a repository to work in; you can use the previous clone of jgit, but to get an output from the example that's almost identical, you can clone the jgit repository as follows:
$ git clone https://git.eclipse.org/r/jgit/jgit chapter5 $ cd chapter5