I see:
$ git pull origin master
From https://bitbucket.org/tecgenome/chl-v2.0-html
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
How can I avoid or get past that error message?
I see:
$ git pull origin master
From https://bitbucket.org/tecgenome/chl-v2.0-html
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
How can I avoid or get past that error message?
I did meet the same issue, and try the command it gets work.
git merge abbranch --allow-unrelated-histories
here we assume that
abbranch
is unrelated to current branch. Above command mergeabbranch
to current branch.Since Git 2.9 (April 2016), you can try:
But check why those branches are no longer common though.
May be there was a force push rewritting all the history of
origin/master
.In which case, if you don't have local commits of your own, it is best to reset your branch to the new one:
if you are facing push Recjected or this issue in android studio you just open your project enable version control integration
and Move to project from android. right click on package --> go to Git --> Add
now come on downside click on terminal and follow given below step