You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure you have a Git template set up. See this closed issue for more details: Git commit message templates #7830), or simply create a .gitmessage template file with some text in it, and link to it from inside your .gitconfig file, something like this:
[commit]
template = ~/.gitmessage
Open VSC.
Make a change in your code, open Git sidebar, see the commit message is the same as you've put in .gitmessage.
Modify the content of .gitmessage without closing VSC.
Make another change in your code, close the Git sidebar, play around. Basically do whatever you like except closing VSC.
Problem is.. how to make VSC update the commit message to the latest content in .gitmessage without restarting VSC?
The reason why I'm needing this is that i have a post-checkout git hook that modifies .gitmessage, adding part of the name of the branch I've switched to. If, for example, I switch to a branch named feature/IU-1234-foo-bar, then my template is updated with IU-1234.
It seems like I can only make VSC re-read .gitmessage by restarting VSC.
The text was updated successfully, but these errors were encountered:
* - type: feat, fix, docs, style, refactor, test, chore
* - scope: can be empty (eg. if the change is a global or difficult to assign to a single component)
* - subject: start with verb (such as 'change'), 50-character line
test git commit
* body: 72-character wrapped. This should answer:
* * Why was this change necessary?
git commit问题
* * How does it address the problem?
* * Are there any side effects?
* footer:
* - Include a link to the ticket, if any.
* - BREAKING CHANGE
microsoft/vscode#39048
@joaomoreno The restore command is not available in the command pallet. I had to assign a keybinding to the command and then invoke it via the keybinding.
Yeah, I don't think it's a command worth putting in the command palette. Seems to be very specific for users who actively modify .gitmessage, doesn't happen often.
Tested on:
Steps to Reproduce:
.gitmessage
template file with some text in it, and link to it from inside your.gitconfig
file, something like this:.gitmessage
..gitmessage
without closing VSC.Problem is.. how to make VSC update the commit message to the latest content in
.gitmessage
without restarting VSC?The reason why I'm needing this is that i have a post-checkout git hook that modifies
.gitmessage
, adding part of the name of the branch I've switched to. If, for example, I switch to a branch namedfeature/IU-1234-foo-bar
, then my template is updated withIU-1234
.It seems like I can only make VSC re-read
.gitmessage
by restarting VSC.The text was updated successfully, but these errors were encountered: