String (GitRepository repository, String branch, String file) { assert !branchExists(repository, branch) : "Branch [" + branch + "] shouldn't exist for this scenario"; cd(repository); touch(file, "initial content"); git(repository, "add " + file); git(repository, "commit -m initial_content"); git(repository, "checkout -b " + branch); echo(file, "branch content"); git(repository, "commit -am branch_content"); git(repository, "checkout master"); echo(file, "master content"); return git(repository, "commit -am master_content"); }