When I start an interactive rebase from a windows cmd, the interactive gitlens rebase window pops up on vscode. When I do the same from wsl, the plain txt rebase file shows up on vscode.
Is there a way to make it so that when I rebase from the wsl, the gitlens rebase shows up?
I Installed wsl with:
wsl --install
Then I selected the default:
wsl --setdefault Ubuntu
I then installed git again on the wsl with:
$ sudo apt-get install git
I then tried to set vscode as the default editor:
$ git config --global core.editor "/mnt/c/Users/user/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code --wait"
I got the vscode path by running:
$ Which code
I would recommend following a process similar to this article which involve:
cd; code .
(space dot)Install in WSL: Ubuntu-20.04
"After installing GitLens on WSL, you should see the same interactive rebase window as when you use Git from CMD.
I had the same problem, and I fixed it with quotation marks.
So instead of
editor = /mnt/c/Users/myuser/AppData/Local/Programs/Microsoft VS Code/bin/code --wait
I had to put the following in my .gitconfig:
editor = \"/mnt/c/Users/myuser/AppData/Local/Programs/Microsoft VS Code/bin/code\" --wait
The path had to be surrounded by quotation marks.
EDIT:
It seems to be enough, when you just put `code` there, like this:
editor = code --wait
That's even easier and you don't need the path. :)
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