Live data from Hacker News

Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

github.com

21–30 of 130 posts

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#21

I like it. A problem I had right away is some people commit using two different emails. Like one from home computer and one from work computer. Would be nice to be able to define them as the same thing.

You might be able to do that with built-in git functionality called gitmailmap. It is basically a file where you can map multiple names and emails to the same one.

It's great when you read further down the comments and come across a gem like this. I had no idea this was possible; thanks.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#22
post #10

By the way, git blaming is really misunderstood by a lot of people; its NOT about who did it, its about which commit is to blame -- that's different.

Isn't that what git bisect is for?

Sometimes you don't know which commit actually caused the problem.

e.g., you realize that something broke A/B test logic on Friday. Sure, there are Jira tickets, but that's slow and annoying to dig through. There are commit messages, but things get squashed, etc. Plus, if you work in a monorepo with about 60 PRs a day, it's hard to know if it was your code or an associated library someone touched.

That's exactly when git bisect helps. It quickly narrows down which commit introduced the bug when you don't know where to start looking. Once bisect identifies the problematic commit, you can then use git blame (if needed) to see who made those specific changes.

Edit: Cleaned up what I was saying to hopefully avoid confusion.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#23
post #13

Cool stuff. I like using Git via the CLI, but when it comes to blame, I simply use the preview UI of the VSCode GitLens extension. It takes half a second to launch it from the command palette and inspect the blame.

I have some VS Code extension (errr... not sure which) that faintly inlines the git blame result on each line of code you're working on. I find it kind of handy.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#25
post #10

By the way, git blaming is really misunderstood by a lot of people; its NOT about who did it, its about which commit is to blame -- that's different.

I have seen `git blame` used to blame specific people. I've seen it work. Some of those people deserved some blame. The manpage explains what the command does. How and why it's used is up to the user.

Alternatively git praise https://github.com/ansman/git-praise

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#27
Followed the link, and the README said:

> This requires that you have Go, Ruby, and the rake Ruby gem installed.

That doesn't cut it for me. git - once built - depends on C libraries and Perl. If you want to add something onto git (that is not specifically targeting Go, or Ruby etc.) - it should not IMNSHO depend on other things.

That doesn't mean you can't write your tool in some modern fashionable language, but eventually you need to bring it down to earth (or rather earth + Perl).

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#28

> You can invoke git-who as git who by setting up an alias in your global Git config This works even without the alias, by the way: by default `git whatever` will search your path for `git-whatever` and execute it.

Wow! I had no idea. Will need to update the README. Thanks for the tip!

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#29

Followed the link, and the README said: > This requires that you have Go, Ruby, and the rake Ruby gem installed. That doesn't cut it for me. git - once built - depends on C libraries and Perl. If you want to add something onto git (that is not specifically targeting Go, or Ruby etc.) - it should not IMNSHO depend on other things. That doesn't mean you can't write your tool in some modern fashionable language, but eve…

These are all build dependencies. You don't need any of these just to run git who. The language could be clearer; I'll update it.
Post reply on HN