Was digging through a project at work today where some guy in 2014 made 100+ commits in a single day and the only one that had a comment said “upgrading to v4.0”.

90 points

git commit -m “minor tweaks”

+3,276 -4,724

permalink
report
reply
18 points

Bug fixes. Too many to count.

permalink
report
parent
reply
11 points

I had one of those and it was two in the night and I was tired and forgot what I did and committed stuff, I dunno.

But normally I’m a good boy and prefix with the ticked id and write down the change and attempted fix.

permalink
report
parent
reply
37 points

Conventional commits all the way! Even if I don’t use the keywords (feat, fix, etc.) I always write the comment in imperative tense; the message should tell you what happens if you merge it.

permalink
report
reply
7 points
*

I totally agree.

Right now I’m on a new project with a teammate who likes to rebase PR branches, and merge with merge commits to “record a clean history of development”. It’s not quite compatible with the atomic-change philosophy of conventional commits. I’m thinking about making a case to change style, but I’ve already failed to argue the problem of disruption when rebasing PR branches.

permalink
report
parent
reply
6 points

Enforced by pre-commit, conventional commits has cleaned up our commit logs and changelog so much.

permalink
report
parent
reply
5 points

That’s pretty neat. Is there a forked version that adds ticket number as a mandatory first class citizen? Cause that’d be darn near perfect.

permalink
report
parent
reply
25 points

You get two options.

Normally it’s a squashed commit of everything in a feature, with a commit message like:

[JIRA-1234] - Descriptive but Concise Name of Feature

But every now and then it’s multiple commits like:

quick fix
Ugh, fix typo
fuck fuck why doesn’t it work
Oh, I’m stupid
permalink
report
reply
12 points

Followed by

fixed formatting

final formatting fix

you gotta be kidding me, fuck you, detekt!

permalink
report
parent
reply
6 points

Bro, squash merge

permalink
report
parent
reply
3 points

Sure, but before squashing you gotta commit

permalink
report
parent
reply
3 points

Or if you’re using feature branches, rebase, squash, and force push before opening the MR

permalink
report
parent
reply
17 points
*
Deleted by creator
permalink
report
reply
3 points

I feel like this might be a good case for LLMs… Auto git commit suggestions based on the diff.

permalink
report
parent
reply
5 points

There are already some attempts but I don’t think it will work, harmful even. Best case scenario, the AI can understand the code as well as a senior engineer from another company. All they can know without the context is what was changed, which is useless. We need the reason why the commit was made, not what was changed. The info is not there in the first place for the AI to try to extract.

permalink
report
parent
reply
3 points

@CanadianNomad @lucas Awesome idea, yeah I can totally see that working well :)

permalink
report
parent
reply
2 points
Deleted by creator
permalink
report
parent
reply
1 point
*

If it does, I haven’t seen it… I’d be happy to test drive it.

permalink
report
parent
reply
14 points

I simply commit to master with the message “git commit”.

permalink
report
reply
6 points

ah so you are the dev from 2014

permalink
report
parent
reply
5 points

I call it job security

permalink
report
parent
reply

Programming

!programming@beehaw.org

Create post

All things programming and coding related. Subcommunity of Technology.


This community’s icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

Community stats

  • 154

    Monthly active users

  • 228

    Posts

  • 1.4K

    Comments