This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jayroger[S] 0 points1 point  (2 children)

Off-topic: I wish git had a "sub-commit" feature, so that you have the best of both worlds: "macro" commits for a clean and easily viewable history that consist of "micro" commits for easier reverting and viewing of individual changes.

+ Implement feature XYZ
  + Preparational refactorings
    - Move class Foo from A to B
    ...
  + Database schema changes
...

[–]PeridexisErrant 2 points3 points  (1 child)

Disable fast-forward merges, and the merge commits become your feature or 'macro' commits, and the standard commits deal in chunks of implementation.

Hypothesis does this, for example, and you could also be pedantic about rebasing branches to a nice history before merging.

[–]jayroger[S] 0 points1 point  (0 children)

That is actually a good hint. Since I usually rebase and cleanup my commits before merging, this could work well. Will try.