Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to write a commit description in source control VScode?

In the GitHub Desktop, I can write an indefinite count of lines in the description field for my commit, and this field is distinguished from the commit message:

enter image description here

I know that I can do the same thing in the git bash using:

git commit -m "Title" -m "Description ..........";

Now I wonder if I can do the same in the Source Control VSCode.
There's a field in a source control tab as the following but I don't know if it's the title of the commit (commit message) or the description:
enter image description here

like image 273
Shayan Avatar asked Nov 27 '25 17:11

Shayan


1 Answers

1. First way

I found out that the first line represents the commit message, and the lines after representing the description:
enter image description here

Result in the GitHub:
enter image description here

2. Second way

This can be done in another way if I leave the message field (highlighted with green in the following image) empty and hit the commit button:
enter image description here

Then a new tab shows up with the COMMIT_EDITMSG name, and I can add the commit message and the description there:
enter image description here

The result in the GitHub after pushing would be the following:
enter image description here

like image 62
Shayan Avatar answered Nov 30 '25 13:11

Shayan



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!