Re:Show HN: Commit Comments – build commit messages in code ...
by davegauer on Thursday January 14, 2016 @03:36PM
(#10904270)
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 ...
by saurik on Thursday January 14, 2016 @04:40PM
(#10904727)
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.
Re:Show HN: Commit Comments – build commit messages in code ...
by dpcx on Tuesday January 19, 2016 @10:53AM
(#10931486)
-p? Is this on git-commit, or something else?
Re:Show HN: Commit Comments – build commit messages in code ...
by jtwb on Tuesday January 26, 2016 @02:33PM
(#10975374)
git add -p
Re:Show HN: Commit Comments – build commit messages in code ...
by joncalhoun on Thursday January 14, 2016 @03:23PM
(#10904161)
I believe this is a pretty common thing based on personal experience.
Re:Show HN: Commit Comments – build commit messages in code ...
by tylorr on Thursday January 14, 2016 @03:54PM
(#10904410)
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 ...
by jedberg on Thursday January 14, 2016 @08:03PM
(#10906283)
I do that as well, but in my branch. When I merge to master I tend to squash into bigger commits so as not to pollute the timeline so much. If someone really needs to see the small commits they can always look at the branch.
Re:Show HN: Commit Comments – build commit messages in code ...
by wingerlang on Friday January 15, 2016 @05:32AM
(#10908382)
I use SourceTree, which has the ability to stage individual lines (I know, git cli can as well). So even if I work on 2-3 things at the same time, it is trivial to select the correct changes for the commit.
Re:Show HN: Commit Comments – build commit messages in code ...
by EvanPlaice on Friday January 15, 2016 @09:45AM
(#10909561)
I use git cola for the same. It's a really light weight little tool that's surprisingly feature complete.
I usually make a bunch of changes at once. Following a break I review the changes and break them up into logical commits.
I aim do break up changes so that the commit log can be read like a book and. I can guarantee that not a single commit contains hidden surprises or unrelated changes.
I don't know how most devs get by with just the CLI. A lightweight gui makes commits and reviewing the history tree so much easier.
Re:Show HN: Commit Comments – build commit messages in code ...
by eecks on Thursday January 14, 2016 @04:19PM
(#10904568)
That's how I do it as well. It's a personal code review.
Re:Show HN: Commit Comments – build commit messages in code ...
by sootn on Thursday January 14, 2016 @03:56PM
(#10904419)
Checkout the -v option :)
Re:Show HN: Commit Comments – build commit messages in code ...
by jedberg on Thursday January 14, 2016 @04:22PM
(#10904587)
That doesn't seem to do anything for me. What am I looking for?
Re:Show HN: Commit Comments – build commit messages in code ...
by chelmertz on Friday January 15, 2016 @10:24AM
(#10909785)
You want the -v option to git commit, not to git add.
git commit -v displays the patch below the message part you're writing, so that you can review the patch as you write the message.
Is this not the common way most people commit?