Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)

During git rebase origin/development the following error message is shown from Git:

fatal: refusing to merge unrelated histories

Error redoing merge 1234deadbeef1234deadbeef

My Git version is 2.9.0. It used to work fine in the previous version.

How can I continue this rebase allowing unrelated histories with the forced flag introduced in the new release?

1 Answer

0 votes
by (50.2k points)

* "git merge" used to allow merging two branches that have no common base by default, which led to a brand new history of an existing project created and then get pulled by an unsuspecting maintainer, which allowed an unnecessary parallel history merged into the existing project.  The command has been taught not to allow this by default, with an escape hatch "--allow-unrelated-histories" option to be used in a rare event that merges histories of two projects that started their lives independently.

 

Please refer the release note of version 2.9 release note you will find above information

And now to allow unrelated histories use the command 

git rebase origin/development --allow-unrelated-histories

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...