in ddm-rrm-git-integration/src/main/java/com/epam/digital/data/platform/management/gitintegration/service/JGitServiceImpl.java [710:722]
private void handleGitPushStatus(Iterable<PushResult> pushResults, Git git) {
for (PushResult result : pushResults) {
for (RemoteRefUpdate update : result.getRemoteUpdates()) {
if (update.getStatus() == RemoteRefUpdate.Status.REJECTED_NONFASTFORWARD) {
log.warn(
"Merge conflict occurred while pushing to master, hard reset on origin head branch");
fetchAll(git);
hardResetOnOriginHeadBranch(git);
throw new MergeConflictException("Merge conflict occurred while pushing to master");
}
}
}
}