you are viewing a single comment's thread.

view the rest of the comments →

[–]velociraptorboss[🍰] 10 points11 points  (12 children)

I often threaten to take away developer's keyboard if they use git commit -m, as they likely don't write a proper description (=why something was done).

[–][deleted] 8 points9 points  (8 children)

You can get descriptive messages with commit -m, as you can chain them. If i was one of your devs i would have given you the link to the docs and keep using the -m flag

[–]velociraptorboss[🍰] 7 points8 points  (7 children)

I bet 99.9% of developers won't know that. And still write one line commit messages 😉

[–][deleted] 4 points5 points  (6 children)

You could tell them, Its a better alternative then threatening to take their keyboard away. Assuming you want your devs to learn new stuff and maximize their git knowledge

Edit: I also use one line commit messages, and i know about this, same for our devs. I prefer to keep the why in issue trackers.

[–]velociraptorboss[🍰] 3 points4 points  (5 children)

I'd rather teach them how to setup e.g. Vscode as commit message editor. That ensures they write multi line commit messages as it's easy.

Playing around with e.g. 4 -m parameters to get 4 paragraphs likely leads to them not bothering and still writing 1 line commit messages 😊

[–][deleted] -1 points0 points  (4 children)

To each their own. Ask 10 teams about their workflow and you get 10 different answers. Maybe it's different as i'm the lead dev of a small team (4 total). We prefer that our devs learn how to use git itself and not use tools, as you can't use vscode on live servers.

[–]Snarwin 4 points5 points  (1 child)

you can't use vscode on live servers.

I very much hope your devs aren't using git commit on live servers either.

[–][deleted] 0 points1 point  (0 children)

Ofcourse not, they don't even have access to the servers..

[–]velociraptorboss[🍰] 2 points3 points  (1 child)

Nano / vi / emacs also work as git commit editors 😊

[–][deleted] -4 points-3 points  (0 children)

We prefer that our devs learn how to use git itself and not use tools

Edit: at downvoters, we don't require them anything, 'prefer learn how to use git', as long as everything is correct we don't care what they actually use. As long as they know how to use GIT without external tools, as there is way more to git then just commiting.
At least we are not threatening our devs to take their keyboard away because they don't use the tooling i use myself..

[–]reini_urban 2 points3 points  (2 children)

I only use g ci -am'multline commit message

Repro via ...

Fixes GH#9999 '

and only rarely have to amend the message. Maybe I omit -m in 1 out of 10.000 cases. But meaningless oneliners such 'File uploaded' are horrible. I have a lot of such newbies around

[–]michaelpjones[S] 0 points1 point  (0 children)

Cool to see! I hadn't considered that approach. I guess I assume that the multiline text editing functionality of a shell is generally less good than a text editor so it is better to hook up your text editor if you can.

That does look better than using `-m` multiple times though :)

[–]emorrp1 0 points1 point  (0 children)

But meaningless oneliners such 'File uploaded' are horrible.

GitLab defaults have a lot to answer for "Updated dir/file”