How to open vs code in a new window when i commit with git bash outside and inside of vs code

I want to know if there any way to open a new window of vs code when i decide to commit with git.

First situation:

I'm ready to commit and i open git bash to type:

git status
git add .
git commit

When i send the last command, vs code are opened to type mi message on him. But i already have one window of vs code open and i want the git bash open vs code in a new window, is this possible?

Second situation

I'm inside vs code and i'm ready to commit. I open git bash terminal inside vs code to commit. Same history:

git status
git add .
git commit

And when i send the last command vs code open a new tag, no a new window, to put the message. I want the editor open a new window to put the message, is this possible?

Upvotes: 1

Views: 1944

Answers (1)

ian
ian

Reputation: 1181

git config --global -e will open the git config in an editor

[core]
    editor = code --wait -n

add to the core.editor -n which according to the docs forces a new window

Upvotes: 3

Related Questions