4 ms·
Every git commit should have a ticket ID. Squash all commits! No development commits in master branch.
by sys_64738 8y ago
Every git commit should have a ticket ID.
Squash all commits! No development commits in master branch.
- wodenokoto 8y agoOnce squashed, how do you go back to the dev commits?
- zdwolfe 8y agoMy dev commits are usually of the form "Add test for Foo.bar", and every master commit has a dozen or so of these dev commits squashed together. Dev commits are not usually immediately useful to anyone other than the author.
- WorldMaker 8y agoLots of different opinions here. I prefer seeing how the sausage was made, just as much as I know that unsettles some folks. Git has a DAG for multiple reasons, but a DAG also gives options for not sweeping everything under the rug in rebase/squashes. I think graph traversal options like --first-parent are more interesting ways to get "clean" commit history logs in "master" than rebase/squash. I've seen (and had to help junior devs fix) far more broken branches due to rebase/squash commits than merge commits in git, that I've almost considered finding ways to entirely disable rebase/squash on projects I work on. They are useful tools that I still sometimes use locally during development myself, but I'd much rather see someone's messy laundry in their commit history than a clean history with an accidental merge bomb lurking under the surface where it isn't even obvious a rebase/squash went bad until you've got the regression report and angry users.