Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+9 votes
2 views
in DevOps and Agile by (29.3k points)
edited by

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

"refusing to merge unrelated histories".

What are unrelated histories? , what are related histories?

closed

1 Answer

+9 votes
by (50.2k points)
edited by
 
Best answer

This error occurs because you might have committed in the remote repository and when you try to pull the error occurs, to resolve this you could use:

git pull origin master --allow-unrelated-histories

git merge origin origin/master

For more information there is a tutorial link given below which will clear all doubts in git.

please refer:

 

Fatal: refusing to merge unrelated histories in git. What is unrelated histories?
Intellipaat-community
by (29.3k points)
yeah, I have committed in the remote repository thank you for this suggestion.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...