The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
I am trying to run the hotfix start and finish with the help of GitHub Actions workflows.
The hotfix-start workflow creates the hotfix branch fine.
The workflow setup for hotfix-finish fails with the error:
Error: Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.16.0:hotfix-finish (default-cli) on project <xyz>: hotfix-finish: fatal: refusing to merge unrelated histories
at the step where the plugin tries merging hotfix branch into the master branch within the runner.
The log statements(of hotfix-start) show that the hotfix branch was created out of master but not sure why this error pops up.
Can you add
--allow-unrelated-histories
option to git merge statement where it tries to merge hotfix branch into master branch?
The hotfix branch it tries to checkout does exists and is all good there.
I am trying to run the hotfix start and finish with the help of GitHub Actions workflows. The hotfix-start workflow creates the hotfix branch fine. The workflow setup for hotfix-finish fails with the error:
Error: Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.16.0:hotfix-finish (default-cli) on project <xyz>: hotfix-finish: fatal: refusing to merge unrelated histories
at the step where the plugin tries merging hotfix branch into the master branch within the runner. The log statements(of hotfix-start) show that the hotfix branch was created out of master but not sure why this error pops up. Can you addoption to git merge statement where it tries to merge hotfix branch into master branch? The hotfix branch it tries to checkout does exists and is all good there.
Runner configuration: Java: 16.0.2 Maven: 3.8.2
plugin configurations used for reference: