1, 2.: This expense of time is about as much as it takes for the editor to open, and then to close it again. 4. Pre-commit hooks are an anti-pattern. The repo creator has no business messing with my local, half-broken experiment/exploration commits. Do that on push if you must. 5. The dual: oh, you passed the wrong flags to commit and you remembered this after you started to write the commit message? Too bad, the mes…
Why you should use a terminal editor to write a commit message
11–20 of 32 posts
Re: Why you should use a terminal editor to write a commit message
#12I just use VS Code's commit message box, easier than CLI in my opinion (I also like VS Code's git commit flow)
Re: Why you should use a terminal editor to write a commit message
#13Re: Why you should use a terminal editor to write a commit message
#14I use an alias for `git commit -m`
Re: Why you should use a terminal editor to write a commit message
#151, 2.: This expense of time is about as much as it takes for the editor to open, and then to close it again. 4. Pre-commit hooks are an anti-pattern. The repo creator has no business messing with my local, half-broken experiment/exploration commits. Do that on push if you must. 5. The dual: oh, you passed the wrong flags to commit and you remembered this after you started to write the commit message? Too bad, the mes…
You can use -m multiple times to create multiline commit messages.
Re: Why you should use a terminal editor to write a commit message
#16- The first two reasons are quickly invalidated once muscle memory is in place.
- I rarely break line and keep my commit messages short, but that depends of your workflow I guess, in my case the information is mostly in the linked ticket.
- If you accidentaly press enter and need to amend, you don't need to write the message again, just edit the part you want in the editor.
- My terminal do not have render issues.
- For the pre-commit hook it's been a while since I used one on commit messages, but how does it check the message validity before commiting using a terminal editor ?
TL;DR: the only point I found applicable in my case is the argument on special characters (such as $), but it never happened to me for now
Re: Why you should use a terminal editor to write a commit message
#17This is a joke, right?
Re: Why you should use a terminal editor to write a commit message
#18I use an editor to write commit messages because it lets me take my time, to format them, to edit them after the initial draft.
If I know the message will be under 50 characters, I might use `-m`, but the rest of the time I want an editor.
Always relevant: https://cbea.ms/git-commit/
Re: Why you should use a terminal editor to write a commit message
#19This is a joke, right?
This sounds more like a post by the Senior Dev that you don't want on your team. It's a commit message, use whatever is quickest/easiest for you...
Re: Why you should use a terminal editor to write a commit message
#20I use an alias for `git commit -m`
:au BufWritePost * !git commit -a -m “Automatically commit crimes against my git history”
Or something like that