try (Repository repository = CookbookHelper.createNewRepository()) {
System.out.println("Listing local branches:");
try (Git git = new Git(repository)) {
String fileName = "temptFile.txt";
File tempFile = new File(repository.getDirectory().getParentFile(), fileName);
<BUG>tempFile.createNewFile();

Path tempFilePath = tempFile.toPath();</BUG>
String initialText = "Initial Text";
System.out.println("Writing text [" + initialText + "] to file [" + tempFile.toString() + "]");

try (Repository repository = CookbookHelper.createNewRepository()) {
System.out.println("Listing local branches:");
try (Git git = new Git(repository)) {
String fileName = "temptFile.txt";
File tempFile = new File(repository.getDirectory().getParentFile(), fileName);
if(!tempFile.createNewFile()) {
throw new IOException("Could not create tempfile " + tempFile);
}
Path tempFilePath = tempFile.toPath();
String initialText = "Initial Text";
System.out.println("Writing text [" + initialText + "] to file [" + tempFile.toString() + "]");
