Our great sponsors
-
libgit2
A cross-platform, linkable library implementation of Git that you can use in your application.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Git made the only choice a popular VCS can make. History rewrites will exist, period. If you're opposed to history rewrites, then git gives you the tools to ensure the repos you control are not rewritten, and that's all it can do in a world where people have control of their own computers.
If Fossil ever becomes as popular as git, people will create software that allows history rewriting in Fossil, and that's fine. People will do what they want on their own computer, and I think it's morally wrong to try and stop that.
Another user in this thread linked to jj [0], an alternative git client that does some pretty weird things. For example, it replaces the working tree with a working commit and commits quite often. I like git and that seems weird to me, but I'm not offended, people can do what they want on their own computer and I have the tools to ensure repos under my control are not effected. That's all I can hope for.
[0]: https://github.com/martinvonz/jj
Ah, fair enough!
On my team we use pre-commit[0] a lot. I guess I would define the history to be something like "has this commit ever been run through our pre-commit hooks?". If you rewrite history, you'll (usually) produce commits that have not been through pre-commit (and they've therefore dodged a lot of static checks that might catch code that wasn't working, at that point in time). That gives some manner of objectivity to the "history", although it does depend on each user having their pre-commit hooks activated in their local workspace.
[0]: https://pre-commit.com/
It will happen, but if you want to see the bash, warts and all, here you go.
https://github.com/enfabrica/enkit/blob/master/scripts/gee
One of the big issues you'll find is that some off the defaults are very specific to my company. I'll fix that in the rewrite.
It's not impossible - https://github.com/g2p/git-fs did this a long while back and https://github.com/presslabs/gitfs did something similar too.
It's not impossible - https://github.com/g2p/git-fs did this a long while back and https://github.com/presslabs/gitfs did something similar too.
Related posts
- GitMounter: A FUSE filesystem for Git repositories
- Cache AnyThing filesystem written in Rust
- Pijul: Version-Control Post-Git • Goto 2023
- libvcs 0.14 - Python library for VCS systems supporting Git / Mercurial / Subversion (Dusting this off after a few years of inactivity, wow is mypy nice)
- Gitfs: Version Controlled File System