Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

Git refusing to merge unrelated histories. What is 'unrelated histories'?

In my local, I made new text file -> git add newfile.txt -> commit -> pull origin master -> ERROR!

"refusing to merge unrelated histories".

What is unrelated histories? , what is related histories?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I think you have commit in remote repository and when you pull this error happen.

use this command

git pull origin master --allow-unrelated-histories
git merge origin origin/master

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...