git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git Unrelated Histories

From
TZTomas Zubiri <me@tomaszubiri.com>
Date
Aug 29, 2018, 16:49 UTC
Message-ID
<CAE3VKEp3PJLCy3tL=K51nNzGry-HySb57QHemZzMtg3RkBmzUw@mail.gmail.com>
Hello all,

I have recently joined a team there seems to be a couple of issue with the git repositories:

1- A branch created from development cannot be merged into the production branch.

(production)
git merge development_feature_branch
fatal: refusing to merge unrelated histories

2- If there is a file that only has a 1 line difference in production, a git diff will return that the whole file is different:

git diff production:folder development:folder
“
diff --git a/folder/file.py b/folder/file.py

index 9bfd6612..20cce520 100644

--- a/folder/file py

+++ b/folder/file.py

@@ -1,245 +1,245 @@

“

I’m not 100% sure what happened here. But it seems that changes and
added files are copied and pasted into the production branch and
uploaded indepenedently as separate files, contributing to a huge
difference between branches.

How can I confirm this hypothesis, and what steps can I take to solve it?

Thank you.
Next: Stefan Beller
Message 1 of 4 in “Git Unrelated Histories”
  1. Tomas ZubiriAug 29, 2018
  2. Stefan BellerAug 29, 2018
  3. Fwd: Git Unrelated HistoriesTomas Zubiri, Aug 29, 2018
  4. Stefan BellerAug 29, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.