VibeDict

🌿Can't combine two different histories

What you'll see
fatal: refusing to merge unrelated histories

The project on your computer and the GitHub repository have different starting points, so git refused to combine them.

🤔 Why does it happen?

  • When the repository was made on GitHub, a README or similar was created along with it
  • The address of a different project's repository was connected

🔧 Try this

  1. Check that the repository address is right with git remote -v
  2. If it is, ask the AI how to combine the two histories safely

🤖 Ask your AI like this

I get 'refusing to merge unrelated histories' when I run git pull. Please tell me how to check that the repository address is right, and if it is, how to combine them safely without losing files.

Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.

Related terms

Other errors in this group