Cover image for Git blame should be called git credit

Git blame should be called git credit

damcosset profile image Damien Cosset Originally published at damiencosset.com ・2 min read

Positive language

Language is important, really important. How we express our ideas and our desires has a big impact on how our words will be received. Positive statements get more quickly received by the audience, but they are also well-received.

Which of these would you like to hear better?

  • Please don't be late at the restaurant tonight.
  • Please be on time at the restaurant tonight.

  • 66% chances you won't die, 33% chances you will die.

  • 66% chances it will save you, 33% chances you will be saved.

Well, in both cases I'd rather hear the second version of those statements. In the second set, it is known as the framing effect. You'll be more likely to choose the option with the positive connotations rather than the option with the negative ones.

git blame

Ok, back to our software things. The reason I got to think about this was because of git blame. Isn't it kind of strange that they went with a negative word such as blame for the command?

Here is the definition for blame:

feel or declare that (someone or something) is responsible for a fault or wrong.

responsibility for a fault or wrong.

Ew, that's not really joyful. But what's the point of the git blame command anyway?

According to the git documentation:

git-blame - Show what revision and author last modified each line of a file

So, git blame tells you who wrote what code in a specific file. But there are no mention that it's to find a fault or wrong doing. We just want to find who wrote some code!

Why go with negative language when we could have something positive?

Here comes credit!

Here is the definition for credit:

publicly acknowledge a contributor's role in the production of (something published or broadcast).

Well, that's a lot more positive! Maybe I want to find who wrote that code so I can congratulate her on such a beautifully crafted piece of engineering.

You know who wrote that 6 months ago?

You. You did. Give yourself some credit you rockstar ❤️


Turns out it's not that complicated if you are some weird person like me who likes to use positive language in your git commands. We can use some alias!

All you have to do is run this command:

git config --global alias.credit blame

Now, git credit does the same job as git blame!

It's a tiny tiny change. But it makes me feel happy to use positive language whenever I can 😄

Have fun ❤️

Posted on by:

damcosset profile

Damien Cosset


French web developer mostly interested in Javascript and JAVA


markdown guide

I dislike the tendency to twist everything positively, therefore I'm not in favor of "git credit". I went with a neutral term instead : "git curious", because I'm just curious about what went there, I don't want to blame anyone for it.


It's hard to type. Git curois, git curouius, git curous :)


I feel similar. Though, I guess it also depends on my mood. Usually my mood is git butwhy. Sometimes it's git wtf. I think a few times it's been git ohcmon or git forcryingoutloud.

And sometimes it's just git whodunnit because this code is a mystery!


Git curious is quite nice also 👍


Looking at other version control systems, the command was mostly called annotate, which actually also exist in git.

In subversion you have both blame and praise, which both are aliases for annotate


At this point, I am still not even sure if positive is always better than negative.

Please don't be late at the restaurant tonight.

IMO, negative prompts for urgent action. (can also mean "undoing") Positive means assurance (and possibly do nothing / leave it to others).

66% chances it will save you, 33% chances you will be saved.

Active voice is always better than passive, at least in my English grammar book. 7 habits probably would say the same.


I guess the positive/negative language impact will be different for each person. I think for me, when the person uses negative language, I will assume he expects me to do something wrong, thus questioning my integrity/seriousness/punctuality...

But, yeah, to each their own 😊


That's you being negative here, not the person asking you not to be late.

"Don't be late" "I won't". That's affirmative and strong, and if you fuck it up, you really do because the outcome is negative for the other, and the only responsible person is you.

"Be on time" 'I will". If you're not on time then what, "oh, I was not on time" (aka, I wasn't late, I was just not on time). See the difference?

Take responsibility for your actions and stop blaming (pun intended) the person who used an innocent sentence to point something out.

If you take everything personally then you probably need to work on yourself instead of trying to change the world so it revolves better around you (hint: it's not going to happen)

I'm not sure why we shifted the topic to responsibility. Obviously, whatever language we use, the responsibility to do a task still falls on the person who actually does the task. I didn't claim that positive or negative language changes any of that. If I'm late, doesn't matter if someone said pretty please or yelled at me, it's still my fault.

I'm only talking about the difference in how we perceive such differences in languages. I like positive language better. I might assume some things based on the language. But it goes so much deeper than that. How well do I know the person? What was the tone? The context?

I didn't say you claimed that, but it's interesting to see you assumed someone did.

You cite the framing effect. There's also an example showing negative language works better:

"93% of PhD students registered early when a penalty fee for late registration was emphasized, with only 67% doing so when this was presented as a discount for earlier registration."

So, if I really want someone to be on time, I'll ask that person not to be late. It has to do with the context, but not how well you know the person (btw if you know the person you probably don't need to remind him/her that).

What I mean here is, it's not a one size fits all approach and I disagree when you say positive language is always better.

In the case of git, I couldn't care less to be honest.

The original naming probably came from the fact that, 99% of the time, you run that command to find out who broke your code, and, back the context question, it's probably fine to blame well known co-workers if they broke it. Comme on dit: "Qui aime bien chatie bien" ;-)

Here's another one: imagine stand up comedians dropping sarcasms because "positive language is better". Good luck getting entertained.

At the opposite end of the spectrum, I totally agree "be nice" will be better perceived than "don't be an asshole" but the negative form is way unbalanced here. "be nice" vs "don't be silly" makes little different to me.

There's a current trend of making everything sterile and politically correct. Positive only exists because negative does. If you delete negative, you get rid of positive too.

All I know is there are more important battles to fight for.

I'm not picking a battle here to be honest. I'm just talking about this particular word and having a discussion about it^^ As people mentioned in the comment, curious or annotate and neutral words that I quite enjoy in this context.

I'm not advocating we change every single word in our vocabulary. Especially when it's not my native language. I just think that this case was interesting and I thought a different one was more appropriate. It's not politically correct, I don't feel offended to type blame in my terminal. It's just an interesting conversation ;)

I was aware of the fear of punishment making people behave differently. There is also another one involving a nursery.

  • The nursery closed at 5PM.
  • Parents would then pick up their kids around 5PM, some would be late as it sometimes happens.
  • Researchers then added a penalty system. Parents would get a fine if they were late.
  • Now, parents picked up their kids later than before because they thought they could buy more time now. 15 minutes for 5 dollars for example could be seen as ok for most parents. Before, it was just a matter of not making the nursery staff way too long.

These are fascinating examples anyway. How positive/negative language and reward/punishment affects our behaviors. In this case though, it's not important, but it's always interesting to see the language we choose to use, and why 😄

From a historical perspective, git originally came from Linus Torvalds - I don't know if he's responsible for the blame command, but I am 100% sure that if he is, it was so that he knew who to yell at for screwing up the Linux kernel ;)


That's interesting. The name is not perfect for sure.

On the other hand, when I see bad code and then I do some git credit, I can easily think "How course I need to give credit Dave, my colleague developer, for this crap!".

The whole problem to me is a mindset problem, more than anything else. Except if the developer really don't care about his code (in that case, he should have never passed the hiring process), the mistake we made depend on the context more than on ourselves.

Understanding that, I would always try to do a git blame, then talk to the person responsible to understand what's the real problem between our technical debt. Then, I would try to find a solution to it.


Oh I agree, whatever term you use, it doesn't replace a good talk with the developer who wrote it to understand their thought process.

More often than not, bad code is not written because the developer thought to himself: "Fuck em all, here's some trash code!"

As someone pointed in the comments, git curious is a nice neutral term which could even be better because it can be used in a credit or blame context!


I'm totally sold on git curious.


You can just use git annotate; it's a synonym for git blame with a slightly different output format, and it's been there for ever.

The advantage of this over custom aliases is that it'll be available on every system.


Git annotate is nice, I didn't know about this. Thanks! And a nice neutral term as well 😄


Yeah the guy who wrote git famously named it after himself 😂

I’ve noticed in Xcode that that the “blame” language has disappeared in recent versions when interacting with git. I’d say it’s only a matter of time.

In the mean time, go ahead and alias it to git credit or git who and continue with your dev :)


TL;DR: Use “blame” to find the person you’re looking for, but don’t personally blame/shame to them for what they did.

I agree with you that it’s really nice to encourage more positive thinking.

On the other hand, I believe that the notion of “blaming” should just be taken a bit tongue-in-cheek. I think that “blame” is actually a fairly accurate name for the way that I tend to use it. More often than not I’ll use it to figure out who wrote some potentially dodgy code; I am kind of looking for someone to blame! But there should be a focus on using the tool to find the person to “blame”, but it’s up to us not to place the blame on them (at least it without knowing the full story).

This is where I think it’s important that we are understanding towards each other and aim to help teach each other when we find room for improvement. If I find someone who’s written some dodgy code it doesn’t mean I’m going to tell them they did a bad job and caused a bunch of problems (i.e. blame/shame them for it). I don’t know the circumstances behind why that code exists. In my experience bad code is most commonly just due to time pressures. It would be super harsh of me to blame someone for making mistakes under pressure. The best thing to do is help them and make sure they understand why the code is an issue and help them see how they can solve and avoid these problems next time.


Completely agree with you. Whatever language we use, it doesn't replace a talk with the developer who wrote the code to understand her thought process at the time. Time pressures or just simply lack of competence are often times the reason why the code is dodgy.

As several people mentioned in the comments already, even tough I like credit, I think a neutral word such as curious or annotate might even be better. It covers whatever use case you may have.


Well, git is made by you-know-who who prefers the "first" version. "Git" itself is the "first-version" lang XD.


We can rename git as "smart" - the second version lang. And then we can commit by typing smart commit and push by smart push. And "smart credit" fellow developers.


Well, usually our appreciation of well written code happens at levels well above a couple lines. The reality is if you are motivated enough to run a command and review its mundane output in order to pin point specifically who last changed a particular line of code, chances are it's because there is something wrong with that particular line of code, rather than because you appreciate how it's written, so...

That said, maybe some neutral term would be better, like git author.


It really isn't about the author, it is about the comment. The line of code was written (or removed) for a reason. Each commit comes with a comment, if you are good at reviewing merge requests you'll be looking for good comments on the code (issue number). This makes blame and bisect more helpful.

Don't blame the author, blame the client.


Please, stop censoring everything. Git blame is perfectly fine.


I'm not censoring anything. I have no power here 😂 I created a git alias. It's an opinion and we are just having a nice conversation.


this is like, late capitalism problems


This is not a problem 😉