andy-5 / wslgit

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
MIT License
1.19k stars 59 forks source link

Interactive Rebase/Commit Squashing not working inside Sourcetree #125

Open dhanar10 opened 2 years ago

dhanar10 commented 2 years ago

In Sourcetree v3.3.9, right-click on a commit and click Rebase children of xxxxx interactively...

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c sequence.editor='C:\Users\dhanar_accelbyte\AppData\Local\SourceTree\app-3.3.9\tools\stree_gri' -c core.editor='C:\Users\dhanar_accelbyte\AppData\Local\SourceTree\app-3.3.9\tools\stree_gri' rebase -i --autosquash ade5bf53e5a5c014889bb30820bb1da4c04e7300
C:\Users\dhanar_accelbyte\AppData\Local\SourceTree\app-3.3.9\tools\stree_gri: 1: C:Usersdhanar_accelbyteAppDataLocalSourceTreeapp-3.3.9toolsstree_gri: not found
error: There was a problem with the editor 'C:\Users\dhanar_accelbyte\AppData\Local\SourceTree\app-3.3.9\tools\stree_gri'.
Completed with errors, see above.

It seems like C:\Users\dhanar_accelbyte\AppData\Local\SourceTree\app-3.3.9\tools\stree_gri is translated to C:Usersdhanar_accelbyteAppDataLocalSourceTreeapp-3.3.9toolsstree_gri

Workaround in WSL2 to avoid this problem:

cd /usr/local/bin
sudo ln -s /mnt/c/Users/dhanar_accelbyte/AppData/Local/SourceTree/app-3.3.9/tools/stree_gri.exe C:Usersdhanar_accelbyteAppDataLocalSourceTreeapp-3.3.9toolsstree_gri