Add git_merge_unrelated rule for git merge --allow-unrelated-histories (#773)

From https://git-scm.com/docs/merge-options#merge-options---allow-unrelated-histories

> By default, `git merge` command refuses to merge histories that do not
share a common ancestor. This option can be used to override this safety
when merging histories of two projects that started their lives
independently.
This commit is contained in:
Joseph Frazier
2018-01-16 20:03:56 -05:00
committed by GitHub
parent aa45585601
commit 027b41da59
3 changed files with 38 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
from thefuck.specific.git import git_support
@git_support
def match(command):
return ('merge' in command.script
and 'fatal: refusing to merge unrelated histories' in command.output)
@git_support
def get_new_command(command):
return command.script + ' --allow-unrelated-histories'