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”.
lohrun ( @lohrun@fediverse.boo ) 90•11 months agogit commit -m “minor tweaks”
+3,276 -4,724
PenguinCoder ( @Penguincoder@beehaw.org ) 18•11 months agoBug fixes. Too many to count.
VanillaGorilla ( @VanillaGorilla@kbin.social ) 11•11 months agoI 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.
f314 ( @f314@lemm.ee ) 37•11 months agoConventional 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.
hallettj ( @hallettj@beehaw.org ) 7•11 months agoI 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.
bloopernova ( @bloopernova@infosec.pub ) 6•11 months agoEnforced by pre-commit, conventional commits has cleaned up our commit logs and changelog so much.
key ( @key@lemmy.keychat.org ) 5•11 months agoThat’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.
HairHeel ( @HairHeel@programming.dev ) 25•11 months agoYou 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
VanillaGorilla ( @VanillaGorilla@kbin.social ) 12•11 months agoFollowed by
fixed formatting
final formatting fix
you gotta be kidding me, fuck you, detekt!
Elw ( @Elw@lemmy.sdf.org ) 6•11 months agoBro, squash merge
VanillaGorilla ( @VanillaGorilla@kbin.social ) 3•11 months agoSure, but before squashing you gotta commit
beardedrhino ( @beardedrhino@lemmy.ca ) 3•11 months agoOr if you’re using feature branches, rebase, squash, and force push before opening the MR
noeontheend ( @noeontheend@beehaw.org ) 11•11 months agoMy commits tend to be pretty verbose. Here’s an example log from one of my projects.
I follow the standard imperative style for the commit title, and then I use the body to summarize any important internal changes, reflect on the overall project status (for example, what milestones this commit crosses or what other work it might enable or require), and state what I’m going to work on next. I’m sure some people find it too wordy, but I like having the commit history show lots of details about the overall status.
Edit: I always have a descriptive summary, i.e., never one word commits or similar.
you are a pro and I aspire to be you
fmstrat ( @fmstrat@lemmy.nowsci.com ) 2•11 months agoI’m not sure I do. I wouldn’t want to read all that just to find the item that broke. Might be faster to read the code.
noeontheend ( @noeontheend@beehaw.org ) 1•11 months agoThat’s why
git log --oneline
exists ;) fmstrat ( @fmstrat@lemmy.nowsci.com ) 1•11 months agoI use
alias gl='git log --graph --abbrev-commit --no-decorate --date=format:'\''%Y-%m-%d %H:%M:%S'\'' --format=format:'\''%C(8)%>|(16)%h %C(7)%ad %C(8)%<(16,trunc)%an %C(auto)%d %>|(1)%s'\'' --all'
It will change your world. noeontheend ( @noeontheend@beehaw.org ) 2•11 months agoThat is sexy. My only problem is that I tend to run my Git operations in a pretty small
tmux
pane on the side of my editing pane, so that layout ends up being too wide to fit well. I’ll definitely keep that alias around for when I have a full screen though! fmstrat ( @fmstrat@lemmy.nowsci.com ) 1•11 months agoHaha yea I have written a number of
git
anddocker
aliases over the years that are permanently in mydotfiles
. I’m always inscreen
but perhaps will get into this newfangledtmux
.
fmstrat ( @fmstrat@lemmy.nowsci.com ) 1•11 months agoWoa…
korstmos ( @korstmos@kbin.social ) 11•11 months agoThe change written as a command
Until I get frustrated by something and just start committing “yeet”
dark_stang ( @dark_stang@beehaw.org ) 8•11 months agoThey fluxuate wildly between short and informative messages like “fixed regex validation on property A” and “I fucking hate prettier” when the build pipeline fails because I had a line that was 2 characters too long.
Luvon ( @Luvon@beehaw.org ) 1•11 months agoOn projects I setup I have prettier run as part of a commit hook. All files will be formatted at all times
andrew ( @andrew@lemmy.stuart.fun ) English8•11 months agoWhen I eventually (usually) rebase, declarative statements of what the commit would accomplish if applied.
When I am testing CICD or generally need to push more frequently for whatever reason, it’s humor and angst all the way.
Ffffffuuuuuuuuu
Pls, why
Okay yeah that was important I guess.
(╯°□°)╯︵ ┻━┻
platysalty ( @platysalty@kbin.social ) 7•11 months agoI’ve had commits called fuck
saigot ( @saigot@lemmy.ca ) 5•11 months agoI like my company’s style:
For issues:
<jira ticket> - [program][deliverable] did this to fix that
Problem: symptoms of the problem that future devs can use to figure out its the same problem
Root cause: why this is broken
Solution: how I fixed it, including the scope
Testing: what testing it has it gone through
ah nice. we include the backlog # in our branch name.
Solaris1789 ( @Solaris1789@jlai.lu ) 5•11 months agoI try (my best) to follow https://www.conventionalcommits.org/en/v1.0.0/
The Doctor ( @drwho@beehaw.org ) 5•11 months agoI try to follow the BLUF pattern: Bottom line up front. The first line is as short a description of the change (“Re-fixed a bug where a URL without a verb could crash the bot.”) with some detail following (“I thought I caught that a couple of years back…”)
I try to save the detail for the code itself: Comments describe what I was thinking at the time for context, the code is the code. I don’t replicate the code comments in the commit message because having the same thing in two places means having to keep two things up to date, and that rarely goes well.
Manticore ( @Manticore@beehaw.org ) 5•11 months ago- “progress on [1], fixed linting [2]”
- “[1] completed, setup for [2]”
- “[3] and [4] completed”
- “fixed formatting”
- “refactoring [1] and [2]”
- “fix variable typos”
- “update logic in [2]”
- “revert package.json and regenerate package-lock”
All my commits have comments. I generally commit after completing a ‘block’ objective, a describe what that was but in very simple terms mostly in regards to the file/section with the most significant logic changes. I don’t always specify the file if I did tiny typos/linting/annotation across a bunch of them, because the logic is unaffected I know that the differences will be visible in the commit history.
My weakness is that I don’t do it often enough. If I’m working on [2] for several hours, I’ll only commit when I consider it minimally-viable (completed 2), or when moving between machines ([further] progress on 2). And I have a bad habit of not pushing every time I commit, just at the end of the day or when moving between machines (though a messy rebase hopefully made that lesson stick), or if somebody else on the team wants to review an issue I’m having.
majkeli ( @majkeli@kbin.social ) 5•11 months agoDeveloper Initials - Jira ticket number which includes the project abbreviation and the ticket number - brief description:
DA - HHGTTG-42 - fix question answer format
If you need details you look in the ticket.
ramplay ( @ramplay@lemmy.ca ) 2•11 months agoDeveloper intials seems a tad redundant since the commit is tied to author(s). But I guess it is only 2 extra char
lencioni ( @lencioni@midwest.social ) 4•11 months agoI always try to capture the reasoning behind why I am making the change. I wrote about this more here https://lencioni.medium.com/the-secrets-to-great-commit-messages-106fc0a92a25
Elw ( @Elw@lemmy.sdf.org ) 3•11 months ago[JIRA-123] Quick summary of objective
Justification (if applicable) Bulleted, high-level overview of important bits Any relevant test results done that won’t also be done in CI