I install git with scoop,but sourcetree can't find the git path correctly.
<setting name="GitSystemPath" serializeAs="String">
<value>C:\Users\12Sigma\scoop</value>
</setting>
Hey @Anniywell , I don't use SourceTree, but the path you're using probably won't work.
Try C:\Users\12Sigma\scoop\apps\git\current .
Or C:\Users\12Sigma\scoop\shims
This path can not modify by user.
The path is automatically updated when the sourcetree is started
Hm, seems to be a problem with SourceTree itself: https://jira.atlassian.com/browse/SRCTREEWIN-7964
Use embedded git as a workaround.
For anyone looking for a solution: a better workaround is to create a directory junction (hard link) for the embedded git sourcetree tries to use.
In %userprofile%\AppData\Local\Atlassian\SourceTree create a directory junction using elevated command prompt named git_local to point to scoop's git location *path*\Scoop\apps\git\current
mklink /J %userprofile%\AppData\Local\Atlassian\SourceTree\git_local *path*\Scoop\apps\git\current
Then in source tree options, specify it to use embedded git.
Hey, as Sourcetree is from the extras bucket I created an issue over there when I encountered the same problem: https://github.com/lukesampson/scoop-extras/issues/1674
I actually found a different workaround by editing the configuration file: https://github.com/lukesampson/scoop-extras/issues/1674#issuecomment-458736215 + https://github.com/lukesampson/scoop-extras/issues/1674#issuecomment-458736787
I also created an issue with Atlassian so they maybe can get their git.exe discovery code fixed to work with git installed via scoop: https://jira.atlassian.com/browse/SRCTREEWIN-11329 Votes welcome!
I would move this to scoop-extras, but I don’t see the “transfer this issue” option, per
https://help.github.com/articles/transferring-an-issue-to-another-repository/
@rasa only repo admins/owners have this privilege.
@r15ch13 happy to handle these tasks if someone is willing to make me an admin. Direct the request to @lukesampson ?
When I select the system Git in SourceTree, the GitSystemPath looks like the parent parent path of the path obtained by running where.exe git.
The problem is that the values ​​for where.exe git and scoop which git are different by default.
To solve this problem, I added %USERPROFILE%\scoop\apps\git\current\cmd to the Path environment variable and made this a higher priority than %USERPROFILE%\scoop\shims.
Most helpful comment
For anyone looking for a solution: a better workaround is to create a directory junction (hard link) for the embedded git sourcetree tries to use.
In
%userprofile%\AppData\Local\Atlassian\SourceTreecreate a directory junction using elevated command prompt namedgit_localto point to scoop's git location*path*\Scoop\apps\git\currentThen in source tree options, specify it to use embedded git.