Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit git commit message in a dedicated tab

As an Atom user, I am used that when committing staged changes a new buffer is opened where I can edit the commit message. In particular, the advantages are:

  • existing spell check is available
  • I can provide a one line comment and an additional longer description
  • I see a list of files to be committed (similar to the case when using the CLI)

What is the vscode equivalent? So far I found two options:

  1. Command Palette -> Git: commit (staged)
  2. Use the activity bar (where I see the staged files but still get a limited editing option of the commit message)
like image 593
Dror Avatar asked Oct 24 '25 03:10

Dror


1 Answers

You could always specify VSCode as the editor to use when running git commit from the command line.

VSCode even has the --wait option : it waits until you close the opened buffer (not until you quit VSCode) :

GIT_EDITOR='code --wait' git commit

The main downside is that I don't know how to target a specific instance of VSCode to use if I have several open.

like image 169
LeGEC Avatar answered Oct 25 '25 18:10

LeGEC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!