After checking out a new branch, I wanted to stop tracking of files like .classpath via Atlassian SourceTree (Version 1.4.0.0). I created a custom action with the details below:
Then, from the "Working Copy changes" panel, I selected a file, right-clicked on it and tried to execute "assume unchanged" custom command. However, I got this totally "scrimpy" error message:
I copied the full command in the error message above and tried to execute it from the command line:
Interestingly, it worked.
Can someone tell me why this custom action didn't work at first place via right clicking and selecting from the menu?
This is interesting. I just noticed this issue on my own setup when a previously working git-based command now no longer worked. I assume something has changed in the more recent version of SourceTree. I believe the issue is now invoked commands won't get the complete environment setup configured just as one might expect when opening a terminal from SourceTree. The Completed with errors
message is a result of the command not being found.
For my own setup, I work around this issue by building my custom actions with the cmd
process. For example:
With parameters:
/c %LOCALAPPDATA%\Atlassian\SourceTree\git_local\bin\sh.exe --login -i -c 'git format-patch --full-index -1 $SHA'
Another example:
With parameters:
/c %LOCALAPPDATA%\Atlassian\SourceTree\git_local\bin\sh.exe --login -i -c ^"git diff --full-index --cached > patch.diff^"
(these examples assume you're using the embedded Git in SourceTree)
Using SourceTree 1.6.12 and Git 1.8.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With