Live data from Hacker News

Show HN: Commit Comments – build commit messages in code comments

github.com

11–20 of 28 posts

Re: Show HN: Commit Comments – build commit messages in code comments

#11
post #6

Earlier quoted context omitted.

Yes, that was my intention when making this project. I prefer the practice of making very small changes and committing frequently with opulent use of branches. However, many of my peers and co-workers have a hard time following the small-commit workflow, so this project is really for them. Being able to mark small (but significant) changes in your code as you code definitely helps reduce some ambiguity in commit mess…

Some feedback on that regard - if you could note line numbers or anything really w/ some of these it would probably help more than just messages. Eg "Concatenated strings in HelloWorld.js#12"

Having the source & line number makes these much more useful.

This is great feedback, thank you!

Re: Show HN: Commit Comments – build commit messages in code comments

#13
post #7

Presumably this is so you don't forget about a bunch of small changes when making a large commit. However, for me, right before I do a commit, I always do a diff to make sure what I'm about to commit is what I intended to, which has the nice side effect of seeing all the changes and reminding me for the commit message. Is this not the common way most people commit?

That's certainly how I do it. I find it very helpful to get a review of my changes, particularly before I begin on the next task.

Re: Show HN: Commit Comments – build commit messages in code comments

#14
post #12

doesn't this encourage the bad practice of doing large commits containing multiple things instead of independent and discrete changes? i guess its still very useful if you are working somewhere where that bad practice is enforced.

It could probably be abused in the way you describe. But I'm not sure it encourages it. I think it's a clever idea and seems like it could be handy even if you do nice, tidy commits.

Re: Show HN: Commit Comments – build commit messages in code comments

#15
post #7

Presumably this is so you don't forget about a bunch of small changes when making a large commit. However, for me, right before I do a commit, I always do a diff to make sure what I'm about to commit is what I intended to, which has the nice side effect of seeing all the changes and reminding me for the commit message. Is this not the common way most people commit?

At this stage I also try to split up my changes into multiple commits, avoiding large commits.

Re: Show HN: Commit Comments – build commit messages in code comments

#16
post #7

Presumably this is so you don't forget about a bunch of small changes when making a large commit. However, for me, right before I do a commit, I always do a diff to make sure what I'm about to commit is what I intended to, which has the nice side effect of seeing all the changes and reminding me for the commit message. Is this not the common way most people commit?

Checkout the -v option :)

Re: Show HN: Commit Comments – build commit messages in code comments

#17
post #7

Presumably this is so you don't forget about a bunch of small changes when making a large commit. However, for me, right before I do a commit, I always do a diff to make sure what I'm about to commit is what I intended to, which has the nice side effect of seeing all the changes and reminding me for the commit message. Is this not the common way most people commit?

That's how I do it as well. It's a personal code review.

Re: Show HN: Commit Comments – build commit messages in code comments

#18
post #16
post #7

Presumably this is so you don't forget about a bunch of small changes when making a large commit. However, for me, right before I do a commit, I always do a diff to make sure what I'm about to commit is what I intended to, which has the nice side effect of seeing all the changes and reminding me for the commit message. Is this not the common way most people commit?

Checkout the -v option :)

That doesn't seem to do anything for me. What am I looking for?

Re: Show HN: Commit Comments – build commit messages in code comments

#19
post #12

doesn't this encourage the bad practice of doing large commits containing multiple things instead of independent and discrete changes? i guess its still very useful if you are working somewhere where that bad practice is enforced.

It could probably be abused in the way you describe. But I'm not sure it encourages it. I think it's a clever idea and seems like it could be handy even if you do nice, tidy commits.

well, it seems not very useful if you are doing a discrete piece of work because you have one short comment to make, not a list...

maybe encourage is the wrong word, but it seems like a useless tool if you are doing things in (what i perceive to be) the right way.

Re: Show HN: Commit Comments – build commit messages in code comments

#20
post #7

Presumably this is so you don't forget about a bunch of small changes when making a large commit. However, for me, right before I do a commit, I always do a diff to make sure what I'm about to commit is what I intended to, which has the nice side effect of seeing all the changes and reminding me for the commit message. Is this not the common way most people commit?

I do a -p and work my way through all of the hunks, pulling out a cohesive "story" of multiple separate commits from the work that I did, sometimes editing hunks as I go to "backport" some changes to fit other parts of the story.
Post reply on HN