Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> But that's what they've tested.

https://pre-commit.com/ helps with that.

> It would be quite fun if we could have hierarchical commits, so I could add bits to a commit without having to squash/amend.

Yes! I've been saying this for years.

Branch merge commits are already this, kind of. However their UI sucks and there's an idea gap which prevents them from being fully understood as such "supercommits" composed of subcommits.

For one, the user should be forced to give meaningful, high level commit messages for merge commits and the tooling should fold commits made on a merge branch into the merge commit by default (effectively linearizing the merged history).



>> hierarchical commits, so I could add bits to a commit without having to squash/amend.

> Branch merge commits are already this, kind of. However their UI sucks and there's an idea gap which prevents them from being fully understood as such "supercommits" composed of subcommits.

Isn't that "idea gap" mainly the fault of all these weird newfangled git workflows that discourage or outright forbid branching? If you have no branches to merge, you can't have a merge commit to act as a "supercommit".

Call your "supercommit" a "feature", and what you need to implement it is... A feature branch.


The history graph not presented as a list but as a collapsible tree, sounds good! Might need a change in merge commit message culture though, or more: in the workflows I have experienced, the best time for writing the message you'd see on the collapsed presentation would be branch time, not merge.

Ideally you'd have a data model that keeps a "what is this" description for branches that can be updated as long as the branch lives and that gets moved to the commit message on merge. Could this be done with some combination of convention and hooks? I guess a file in the root that is always kept on target/into branch state, with the lost file content of the source/from branch moved to the commit message would be all that's needed?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: