![]() ![]() ![]() Recommended: “The “fatal: refusing to merge unrelated histories” Git error.As that is a very rare occasion, no configuration variable to enable this by default exists and will not be added. This option can be used to override this safety when merging histories of two projects that started their lives independently. The get-merge command (from GitHub documentation): -allow-unrelated-histories:īy default, git merge command refuses to merge histories that do not share a common ancestor. The “fatal: refusing to merge unrelated histories” Git error occurs when two unrelated projects are merged (i.e., projects that are not aware of each other’s existence and have mismatching commit histories). If it opens the nano editor you can just save and close with Ctrl + X. ![]() Git pull origin main -allow-unrelated-histories Git pull origin master -allow-unrelated-histories Run one of the below commands # It could be master Following the error when doing a git pull origin master: fatal: refusing to merge unrelated histories
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |