fonsdant commented on PR #17204: URL: https://github.com/apache/kafka/pull/17204#issuecomment-2365398034
> Can we do: fetch, merge --ff-only, push instead? It seems this approach is not so out-of-the-box. In my tests, Git fails with fatal: refusing to merge unrelated histories: [here](https://github.com/apache/kafka/pull/17204#pullrequestreview-2319726159). ``` git switch -c trunk-cached if git fetch origin trunk-cached; then git reset --hard origin/trunk-cached else echo 'Remote ref does not exist' fi git merge ${{ github.sha }} # fail here git push origin trunk-cached ``` Even if we add `--allow-unrelated-histories`, then the failure becomes a conflict merge: [here](https://github.com/fonsdant/github-actions/actions/runs/10977036891/job/30478533261#step:3:20). Curiously, I have no issues performing merge locally. I am trying to understand if I have made something wrong in remote repo. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
