4 ms·
It seems like this is something that should be handled by flags/tagging or some other object rather than destroying history. Like, instead of collapsing A-E in
by Pxtl 13y ago
It seems like this is something that should be handled by flags/tagging or some other object rather than destroying history.
Like, instead of collapsing A-E into a single commit, A should be marked as the start of project/feature/milestone/whatever Foo, and E as the completion of it, and A-E shown as a single object when viewing the history but allowing the user to drill-down to expose the internal commits.
Destroying information is never good.
- twic 13y agoYes. This. The whole religion about keeping history "clean" would collapse if we had this single technical ability. You can get some of the way there now by making use of tags or branch labels or something. At one point, i wrote a Mercurial hook that would sit in the central repository add a tag every time someone pushed. Then, only tagged commits would be considered first-class parts of history. There are numerous problems with this, not least that none of the existing tooling is aware of this convention. The fact that Mercurial tags live in commits, which pushers then have to immediately pull, was also very awkward. You can use branches in a similar way: do all the intermediate, historical-footnote, commits in a development branch, and merge into a master branch to publish them. Then only consider commits in the master branch to be first-class. This is roughly Git Flow, isn't it? Again, the tooling doesn't quite do everything you'd want it to around this.