What did you do before the bug happened? (Steps to reproduce your issue) git clone -b A --shallow-exclude=B What did you expect to happen? (Expected behavior) My remote repo looks like this: A B # two branches, A and B 1 | # commit in A 2 |\ # merge from B to A 3 | # commit in B 4 | # commit in A 5 |\ # merge from B to A 6 | # commit in B A and B are branches. 1 is a commit in A, 2 is a merge from B to A etc. I would have expected the following repo as a result A 1 | 2 | 4 | 5 | I would also have expected a shallow file with the following commits in .git: 3 6 What happened instead? (Actual behavior) When I run the command I get a repo like this: A 1 | I also get a shallow file in .git with the following commit list 2 5 What's different between what you expected and what actually happened? The commit list in the shallow file is offsetted one commit. he consequence of that is that not only B is excluded but also everything in A that depends on B Anything else you want to add: The result is the same if I use the git fetch --shallow-exclude 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.40.0.windows.1 cpu: x86_64 built from commit: 1d90ca2906dd4b7ddaf0669a13c173ec579d794a sizeof-long: 4 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Windows 10.0 22621 compiler info: gnuc: 12.2 libc info: no libc information available $SHELL (typically, interactive shell): <unset> [Enabled Hooks] not run from a git repository - no hooks to show