简体   繁体   中英

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?

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

[core]
    editor = code --wait -n

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM