当我在 vs code 外部和内部使用 git bash 提交时,如何在新窗口中打开 vs code

问题描述 投票:0回答:1

我想知道当我决定使用 git 提交时是否有办法打开 VS Code 的新窗口。

第一种情况:

我准备好提交并打开 git bash 来输入:

git status
git add .
git commit

当我发送最后一个命令时,VS Code 会打开并在他身上输入 mi 消息。但是我已经打开了一个 VS Code 窗口,并且我想在新窗口中打开 git bash VS Code,这可能吗?

第二种情况

我正在使用 vs code,我已准备好提交。我在 vs code 中打开 git bash 终端来提交。相同的历史:

git status
git add .
git commit

当我发送最后一个命令与代码时,打开一个新标签(没有新窗口)来放置消息。我想让编辑器打开一个新窗口来放置消息,可以吗?

git visual-studio-code commit
1个回答
3
投票

git config --global -e
将在编辑器中打开 git 配置

[core]
    editor = code --wait -n

添加到 core.editor -n ,根据 docs 强制创建一个新窗口

© www.soinside.com 2019 - 2024. All rights reserved.