Ensure force checkout to clean up any leftovers from a previous state.

Closes #62
This commit is contained in:
Mark Paluch
2023-10-13 11:40:07 +02:00
parent 1c2ca1fc00
commit c6f1bda740

View File

@@ -216,7 +216,7 @@ public class GitOperations {
doWithGit(project, git -> {
logger.log(module, "git checkout %s", tag);
git.checkout().setName(tag.toString()).call();
git.checkout().setName(tag.toString()).setForced(true).call();
});
});
@@ -788,7 +788,7 @@ public class GitOperations {
doWithGit(project, git -> {
Optional<Ref> ref = Optional.ofNullable(git.getRepository().findRef(branch.toString()));
CheckoutCommand checkout = git.checkout().setName(branch.toString());
CheckoutCommand checkout = git.checkout().setName(branch.toString()).setForced(true);
if (ref.isPresent()) {