DEV Community

Cover image for Do You Cuss In Your Commit Messages?

Do You Cuss In Your Commit Messages?

Jack Harner πŸš€ on May 31, 2019

Do You Cuss In Your Commit Messages? πŸ”² Never πŸ”² Sometimes βœ… All The Fucking Time Let 'Er Rip ...
Collapse
 
jhuebel profile image
Jason Huebel • Edited

I don't. Ever.

This is a life-rule that I apply to everything: If something could come back to embarrass me in the future (even 2 seconds from now), then I probably shouldn't say/do it. What you say on the Internet, in particular, is forever. Somewhere, someone has indexed your git commit message, tweet, Facebook post, etc.

I will readily admit this is difficult for me, though. I'm a high-functioning autistic. Filtering myself doesn't come naturally.

Anyway, I wish more people followed that rule. The Internet would be a nicer place for it.

Collapse
 
vuild profile image
Vuild

No, because then if I read it back it's like a drunk person swearing at me about something I don't understand.

I do sometimes commit like:
CSS
CSS
CSS
CSS
CSS
CSS
HTML
CSS

To punish myself. πŸ˜…

Collapse
 
jackharner profile image
Jack Harner πŸš€

drunk person swearing at me about something I don't understand.

Most of my commits are this way, cuss words or not. πŸ˜‚

Collapse
 
vuild profile image
Vuild

Those are my commits.

Yours look the same but with swears Jack. look the same but swears Jack. Yours look the same but swears Jack.
Yours look the same but swears Jack.
Yours look the same but swears Jack.
look Yours the same but Jack. swears
Yours look the same but swears Jack.
the same but the same but the same but

youtube.com/watch?v=NgMdz2fe0CY

Cheers πŸ₯‚ 🍻

Thread Thread
 
jackharner profile image
Jack Harner πŸš€

It's been so long since I've watched The Shining. I think it's time for a rewatch.

Thread Thread
 
vuild profile image
Vuild

Watch something scary

youtube.com/watch?v=2T5_0AGdFic

Collapse
 
jsrn profile image
James

I try not to. I'm usually professional, and I normally write (what I think are) good, informative commit messages.

$ git log | grep 'REDACTED_NAUGHTY_WORD_REGEX' | wc -l
25
$ git log --author="jsrn" | grep 'REDACTED_NAUGHTY_WORD_REGEX' | wc -l
6

Not bad for 5 years or so on this code base. I'm responsible for a mere 24% of the sweariness!

Collapse
 
lankydandev profile image
Dan Newton

I never swear in commits even though I'm a potty mouth and swear all the time.

The furthest I'll go is super sarcastic comments if I have been frustrated with what I am working on.

I would like to fit some emojis into my commits but have been waiting for someone else from work to make the first jump πŸ˜„

Collapse
 
jackharner profile image
Jack Harner πŸš€

but have been waiting for someone else from work to make the first jump

Be the change you want to see in this world!

git commit -m "πŸ› = squashed. 🚧🚧🚧 Still Working On XYZ 🚧🚧🚧"
Enter fullscreen mode Exit fullscreen mode
Collapse
 
moopet profile image
Ben Sinclair

"Stepladder equals squashed. Traintracks still working on XYZ traintracks."

That's a nope from me.

Collapse
 
danazar96 profile image
Aidan Walters-Williams • Edited

Considering your git commits are a digital journal of what work was performed in an atomic unit, I don't see why you would ever cuss in a commit message? What use would that provide your future self?

Collapse
 
jackharner profile image
Jack Harner πŸš€

I think it's safe to say my commit messages in general are not very helpful. Luckily so far it's only me working on things and most of my git usage has been for moving work from one computer to another/glorified backup.

I definitely need to get better with it though. How often do you actually commit? Every time whatever you're working on is "working"?

Collapse
 
danazar96 profile image
Aidan Walters-Williams

It's difficult to say how often you should commit - that is often down to the nature of the work you are carrying out. I guess an overarching rule would be "commit when you reach a natural stopping point in your work" but that is subjective and a lot of it depends on the environment you're working in (how big is your team, do you feature branch or commit straight to master, etc...) Moreover, that natural stopping point can be wildly different from ticket to ticket.

My general rule for naming a commit is "Describe what you achieved in the commit". So if I come across a piece of code 5-6 months later and I'm like "WTF is this for?!", I can git blame, check out the commit message and hopefully that will explain why it is there.

For example, my latest commit on one of the projects I'm working on at the moment is: "Add background job to build monthly categories after a MonthlyBudget is created"

Collapse
 
arturace profile image
Artur Madjidov

I find their use similar to docs that explain what a function, method, property, etc. does. It's not immediately useful, as you know what it does, but in the long run or if you work in a team, it provides the ability for the programmer to never need to see the code. You explained what something does with a standard human language and by doing so, saved time.

Collapse
 
rachelsoderberg profile image
Rachel Soderberg • Edited

I am curious about this too. My commit messages revolve around the work that was done, and none my completed work involved something related to a curse word.

Collapse
 
moopet profile image
Ben Sinclair

No, in the same way I don't tend to swear in posts here. It's not the right environment.

I swear quite a lot in real life, but when I've looked back over commit messages I made in the past, the times I've sworn just look infantile and embarrassing.

Collapse
 
ben profile image
Ben Halpern

I try not to use actual cusses, but I use some cuss-adjacent words, like faaaaaack, on occasion.

Collapse
 
healeycodes profile image
Andrew Healey

Recently, I found some β€˜bad’ words in a decade-old comment in a rarely edited file.

Collapse
 
jackharner profile image
Jack Harner πŸš€

Did anybody else find it?

I accidentally left a console.log("Fuck Off") in a project for way longer than it should've been.

Collapse
 
healeycodes profile image
Andrew Healey

I pretty much showed it to everyone sitting near me because I thought it was hilarious 😊

Collapse
 
nathanenglert profile image
Nathan Englert

Nicely done on the bot sir. πŸ˜‚

Collapse
 
jackharner profile image
Jack Harner πŸš€

Thanks!

Collapse
 
steffenpedersen profile image
Steffen Pedersen

You don't really get the point of commit messages, if you write them like that 😊

I think you should read this guide.

Collapse
 
jackharner profile image
Jack Harner πŸš€

I definitely don't use commit messages to their full/proper potential.

Thank you for that guide. It's definitely something I need to get better with.

Collapse
 
oscherler profile image
Olivier β€œΓ–lbaum” Scherler

I even did it in huge ASCII-art letters, once. It was at work, at 4 AM on a weekend, if I remember correctly.

Collapse
 
jackharner profile image
Jack Harner πŸš€

I think if you're pushing Work commits at 4AM on weekend, I would expect nothing less than massive ASCII-art cuss words.

Collapse
 
icy0307 profile image
icy0307

Git commit messages are for people to read, it is unethical to curse in commit messages.
However, what about git notes?