Earlier quoted context omitted.
It’s not a career ending thing if somebody saw my commit history. It’s just mildly embarrassing. It’s not a waste of time either… time spent crafting a final commit from the whole change, writing a descriptive commit message, and documenting everything well helps people review it, and that’s time well spent.
Ok, that's one strategy. However, we put that information in our issue tracker, docs, and source code comments, where more people can reach them more easily. Commit msg is PROJ-1234, which gets automatically gets linked to issue with design and comment history and project/product folks can contribute.
A Better Git Flow
111–115 of 115 posts
Re: A Better Git Flow
#112Earlier quoted context omitted.
If every commit passes tests, tools like `git bisect` are much more useful.
how do you mean?
Re: A Better Git Flow
#113Earlier quoted context omitted.
Ok, that's one strategy. However, we put that information in our issue tracker, docs, and source code comments, where more people can reach them more easily. Commit msg is PROJ-1234, which gets automatically gets linked to issue with design and comment history and project/product folks can contribute.
I’m lost. What are you arguing at this point?
Re: A Better Git Flow
#114Earlier quoted context omitted.
Why not create a new branch (let's call it B) from your messy branch (call it A) and squash everything in B before raising a PR from B -> master That will solve your problems if you're the messy type.
Sure, that’s exactly what I’m advocating for? I’m confused. You said it’s a waste of time to do this and to just squash when merging instead. I’m saying I’d rather squash first so that my PR looks clean and doesn’t contain my WIP commits. Then you respond saying “well you can just squash before your PR then”… are we going in circles?
My original comment was targeting the two supposed problems that the article is framing and the supposed convoluted (and possibly dangerous) solution with git reset.
Re: A Better Git Flow
#115Earlier quoted context omitted.
how do you mean?
If you find a new bug, git bisect can very quickly find which commit introduced the bug, and understanding the origin makes fixing the bug easier. That mechanism does not work nearly as well if some commits are not in a usable state.
git bisect skip $(git merge-base main branch)
?to me, squashing the tree to simplify an edge case seems needlessly radical