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

[Bug] Git subtree regression

From
Ddev@dietrich.pub <dev@dietrich.pub>
Date
Dec 26, 2025, 19:58 UTC
Message-ID
<176677910605.6.2281395015810449820.1087545551@dietrich.pub>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

I use git subtrees to manage the monorepo `https://github.com/athena-framework/athena`. When using git 2.52.0, I can add a new remote for say the `clock` component via `git remote add clock git@github.com:athena-framework/clock.git` Then do a `subtree push` via `git subtree push --prefix="src/components/clock" "clock" master`.

What did you expect to happen? (Expected behavior)
I expected it to work and say `Everything up-to-date`, because it is up to date.
What happened instead? (Actual behavior)
It fails because of:
```
To github.com:athena-framework/clock.git
 ! [rejected]        0efb3d9858e3bfee65165508aeeacc50417c9a99 -> master (non-fast-forward)
error: failed to push some refs to 'github.com:athena-framework/clock.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
```
What's different between what you expected and what actually happened?
Seems to be a regression of https://github.com/git/git/commit/83f9dad7d6fb5988b68f80b25bd87c68693195dd as it used to work and now it doesn't.
Anything else you want to add:

I did some initial exploration and it might have something to do with the `clock` component originally being added via `git subtree add --squash`. For another component:

- git 2.51.1: split produces 92 commits, properly connected to original repo history
- git 2.52.0: split produces 8 commits, disconnected history with a new root
The `git-subtree-split:` marker in the squash commit body doesn't seem to be honored in 2.52.0.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.52.0
cpu: x86_64
built from commit: 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
rust: enabled
libcurl: 8.17.0
OpenSSL: OpenSSL 3.6.0 1 Oct 2025
zlib-ng: 2.2.5
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Linux 6.18.2-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 18 Dec 2025 18:00:18 +0000 x86_64
compiler info: gnuc: 15.2
libc info: glibc: 2.42
$SHELL (typically, interactive shell): /bin/bash
Next: george@mail.dietrich.pub
Message 1 of 11 in “[Bug] Git subtree regression”
  1. dev@dietrich.pubDec 26, 2025
  2. george@mail.dietrich.pubDec 30, 2025
  3. Colin StagnerJan 4, 2026
  4. george@mail.dietrich.pubJan 4, 2026
  5. Colin StagnerJan 5, 2026
  6. george@mail.dietrich.pubJan 6, 2026
  7. Colin StagnerJan 10, 2026
  8. george@mail.dietrich.pubJan 10, 2026
  9. Colin StagnerFeb 15, 2026
  10. D. Ben KnobleFeb 16, 2026
  11. george@mail.dietrich.pubFeb 18, 2026

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.