1

I would like to ask how to correctly solve this problem.

I have Visual Studio Code set up with docker containers so I can edit, build and even debug my project that is in a git. I am using NodeJS/Typescript docker image mcr.microsoft.com/vscode/devcontainers/typescript-node. The problem is when I try to do interactive rebase in git since git tries to open an editor to allow user to edit a file with rebase instructions but it can't find any editor.

Is it possible to set up git to use the Visual Studio Code for it?

I have noticed the docker image contains visual studio code in /vscode/vscode-server/bin/linux-x64

Jiří Lechner
  • 750
  • 6
  • 19
  • 1
    Have you tried to configure vscode as default git editor? - https://stackoverflow.com/a/36644561/13726598 – zaigr Jan 14 '22 at 10:12
  • I know how to configure it in git. That is not a problem. the problem is what path should I use. The vscode is an app in the host and I want to use it from a docker container. – Jiří Lechner Jan 14 '22 at 10:44

1 Answers1

-1

Apparently the docker image was already configured correctly so it is enough to configure git's editor the usual way.

The reason why it didn't work for me is my host is on windows and the docker image is linux and I had the configuration in my git repository. So I just need to have two separate git configurations for two use cases.

Jiří Lechner
  • 750
  • 6
  • 19