Live data from Hacker News

Why you should use a terminal editor to write a commit message

joaomagfreitas.link

21–30 of 32 posts

Re: Why you should use a terminal editor to write a commit message

#21

Earlier quoted context omitted.

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...

Seems more like the opinions of a beginner who’s just recently discovered the joy of the terminal, and is in the zealous honeymoon phase, to me.

I non-ironically want to be around when they discover vim!

Re: Why you should use a terminal editor to write a commit message

#23

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…

> 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.

Git hooks are not part of the version controlled repository so you can already set them to whatever you like (for anything executed local anyway, push hooks are up to the remote).

You can also bypass them using --no-verify for cases where you consider that to be the right thing to do.

Re: Why you should use a terminal editor to write a commit message

#25

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…

1 & 2 sound like the person doesn't know how to touch type. An adult who types as a major part of their job should easily be able to hit 70-80 WPM (5.8-6.7 characters per second) when copying random words, faster for actual typing. If ` -m "` and `"` (6 extra characters) is costing you more than a second, you should make an alias and also practice typing.

Re: Why you should use a terminal editor to write a commit message

#26

Earlier quoted context omitted.

:au BufWritePost * !git commit -a -m “Automatically commit crimes against my git history” Or something like that

Thanks, Satan.

Thank me not my child, we serve only ourselves. Now, go forth and ply my corruption as you see fit.

Re: Why you should use a terminal editor to write a commit message

#28

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…

1 & 2 sound like the person doesn't know how to touch type. An adult who types as a major part of their job should easily be able to hit 70-80 WPM (5.8-6.7 characters per second) when copying random words, faster for actual typing. If ` -m "` and `"` (6 extra characters) is costing you more than a second, you should make an alias and also practice typing.

Seriously, what programmer is having a hard time finding " on their keyboard?

Re: Why you should use a terminal editor to write a commit message

#29

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…

> 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. Git hooks are not part of the version controlled repository so you can already set them to whatever you like (for anything executed local anyway, push hooks are up to the remote). You can also bypass them using --no-verify for cases where you consi…

Weird, I never once set them myself but I've been subjected to them a couple times. Is my laptop developing gremlins?

Re: Why you should use a terminal editor to write a commit message

#30

Earlier quoted context omitted.

> 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. Git hooks are not part of the version controlled repository so you can already set them to whatever you like (for anything executed local anyway, push hooks are up to the remote). You can also bypass them using --no-verify for cases where you consi…

Weird, I never once set them myself but I've been subjected to them a couple times. Is my laptop developing gremlins?

Someone might have given you a command to run when setting up a repo. For example, it’s standard practice to download a hook which assigns a Change-Id to each commit when using Gerrit.
Post reply on HN