Live data from Hacker News

Ask HN: Is Git commit history useful to you?

news.ycombinator.com

1–10 of 11 posts

Ask HN: Is Git commit history useful to you?

#1
I'm curious about how everyone here uses git commit history. I only use commit history for these use-cases:

1. When I'm trying to understand the context around a change that has been made to a file. usually the whole commit provides a better context. 2. When I want to revert a change that breaks the latest release. 3. Comparing branches for rebasing/merging

Are there any other use-case that people use git commit history for?

is commit history useful in other ways?

Re: Ask HN: Is Git commit history useful to you?

#4
Git history can find code that is changed often, has many developers changing it, or was mostly written by someone no longer with the organization. Looking at the evolution of the code over time can help identify problem code as well as find areas that are in need of more attention, either by refactoring or otherwise cleaning up.

https://pragprog.com/titles/atcrime2/your-code-as-a-crime-sc...

Re: Ask HN: Is Git commit history useful to you?

#5
1. seeing who originally wrote the file i'm working on, which can set up some expectations, eg i know a certain someone likely didn't test the code well, if at all, so i know that i'm going to spend time constraining the existing code with tests before i can even get into it properly 2. figuring out what i did today so i can fill in the absolutely pointless timesheet that i have to fill out every day, because we can't just assign hours to a trello card, no! we have to also blurb about it so someone else can gloss over it

Re: Ask HN: Is Git commit history useful to you?

#6
It's useful in hinting which commit I should use to blame a file. I use blame to trace back to the pull request that introduced the changes that I'm interested in seeing. Commit messages themselves are rarely helpful to me since git hosts put way more useful context around sets of changes
Post reply on HN