Reputation: 7845
is it possible to do a git commit and when the editor opens it is already filled with a message to be edited?
example:
git commit "some string"
would open the text editor with "some string" that could be edited.
Use case: I have a git alias to commit work in progress (end of the day for instance) git commit -m ":construction: WIP"
(yes, I use emojis on some commit messages), but I would like to add some extra details sometimes.
For the git documentation there's:
--message
flag but doesn't open the editor--template=<file>
but it uses a message template from a fileAny solutions?
Upvotes: 0
Views: 1176
Reputation: 67772
Use the -e|--edit
option to allow manual editing even when you provide a message on the command line:
$ git commit -em ":construction: WIP"
This and many other options are described in the documentation
Upvotes: 3