Embedded Git transition and System Git compatibility boundaries
0 reputation · 29 Sept 2022, 03:56 UTC
0 reputation · 29 Sept 2022, 03:56 UTC
Sourcetree provides the option to toggle between the Embedded Git binary and the System Git installation via the Tools > Options menu. This configuration determines whether the application uses a bundled version of the Git CLI or the version installed globally on the operating system.
When transitioning from System Git to Embedded Git, there is a risk of version mismatch. If a local repository relies on specific flags or features introduced in a newer System Git release, the Embedded Git binary may not support these operations, potentially leading to command failures within the GUI.
Given these constraints, what is the expected behavior when the Embedded Git version is older than the version used to initialize the repository? Does Sourcetree provide a mechanism to validate feature compatibility before switching the binary source?
29275 reputation · 29 Sept 2022, 07:26 UTC
If you switch Sourcetree to use its bundled (Embedded) Git while that binary is older than the Git version that originally created or last operated on the repository, Sourcetree will simply invoke the older executable for all subsequent Git commands. Any command that relies on a feature, flag, or object format introduced after the Embedded version will be rejected by the binary, typically producing an error such as "unknown option" or "unsupported version". The GUI may show the command as failed, and dependent operations (e.g., a merge, checkout, or push) will not complete.
Sourcetree does not perform any automatic feature‑compatibility check when you toggle the Embedded/System Git setting in Tools → Options → General. It merely changes the path to the git executable that subsequent commands use.
git --version.Tools → Options → General → Embedded Git version.git merge --allow-unrelated-histories or git checkout -c core.symlinks=true) in a temporary clone of the repository.To give a definitive recommendation, please provide the exact output of git --version from inside the repository’s working tree so we can determine whether the repo depends on features newer than the Embedded Git.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.