How to reuse message when amending the last commit? #3671
-
I am wondering what's the quickest way to undo the last commit, apply changes and commit agin with the old commit message. So far, the solution I found is I can go to the 'Reflog' and copy the deleted commit message. Is there any quicker approach? In VSCode, when you undo a commit using its built-in source control tool, it always keep the message in the commit section for the next commit. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
If you just want to add/modify changes, press For removing things from the commit, take a look at the tutorial feature called "Custom patch". |
Beta Was this translation helpful? Give feedback.
-
A few more options, none of which are really great:
|
Beta Was this translation helpful? Give feedback.
-
Thanks all! The more I think the more I understand there was no need to reuse the message if I actually amend it 😄 The habit comes from the fact, I used to run 'git reset --soft' and then stage the changes and commit again. |
Beta Was this translation helpful? Give feedback.
If you just want to add/modify changes, press
A
in theFiles
panel.For removing things from the commit, take a look at the tutorial feature called "Custom patch".