(no title)
rajeevk | 2 years ago
>>it was built for a very different world in 2005 (slow networks, much smaller projects, no cloud)
Slow network: why is this a negative thing? If something is designed for a slow network then it should perform well in a fast network.
Mush small project: I do not agree. I can say that it was not designed for very very large projects initially. But many improvements were made later. When Micorosoft adopted Git for Windows, they faced this problem and solved it. Please look at this https://devblogs.microsoft.com/bharry/the-largest-git-repo-o...
No cloud: Again I would not agree. Git is distributed so should work perfectly for the cloud. I am not able to understand what is the issue of Git in the cloud environment.
>>In our previous startup, a data scientist accidentally destroyed a month’s work of his team by using the wrong Git command
This is mostly a configuration issue. I guess this was done by a force push command. IFAIK, you can disable force push by configuration.
jsnell|2 years ago
Designing for resource-constrained systems usually means you're making tradeoffs. If the resource constraint is removed, you're no longer getting the benefit of that tradeoff but are paying the costs.
For example, TCP was designed for slow and unreliable networks. When networks got faster, the design decisions that made sense for slow networks (e.g. 32 bit sequence numbers, 16 bit window sizes) became untenable, and they had to spend effort on retrofitting the protocol to work around these restrictions (TCP timestamps, window scaling).
fourside|2 years ago
funcDropShadow|2 years ago
sasham|2 years ago
grumbel|2 years ago
Git doesn't give you access to the server side reflog either. So it's of not much use if you don't control the server.
As for losing data with Git, the easiest way to accomplish that is with data that hasn't been committed yet, a simple `git checkout` or `git reset --hard` can wipe out all your changes and even reflog won't keep record of that.
noufalibrahim|2 years ago
billpg|2 years ago
Github rejected my commit as I had the wrong email address. I then had to try and work out how I delete a commit but keep all my changes so I could commit it all again but with the correct email address.
I'm not sure exactly what I did but in my ham-fisted experimentation I deleted the commit and restored my local copy back to the way it was before my commit, losing all my work that day.
cqqxo4zV46cp|2 years ago
sasham|2 years ago
Git had much more edge when it was competing vs SVN and other centralized VCSs. With 10Mb networks (if you were in office) you could feel physical pain when committing stuff ><
Reg how Git is not perfect in the cloud world - check out GitHub's blog post here about their cloud dev environment, Codespaces https://github.blog/2021-08-11-githubs-engineering-team-move...
"The GitHub.com repository is almost 13 GB on disk; simply cloning the repository takes 20 minutes."
Moving 13GB inside your own cloud should take seconds at most. The problem is the way Git works, it clones your entire repository into the container with your cloud environment, using a slow network protocol. With Diversion it takes a few seconds.
andsoitis|2 years ago
It is not about bashing git; it is about anchoring your argument of why Diversion is a better alternative around git. You're basically taking your game/arguments to their playing field, and thus will have an uphill battle for mindshre.
Instead, consider reframing the playing field and mention git less (if at all). Something like "the future of version control is blah". Surprise us, talk to us about your vision for source control, or better yet, code and multi-discipline collaboration (e.g. between eng and design), etc.
asimpletune|2 years ago
> The problem is the way Git works, it clones your entire repository into the container with your cloud environment, using a slow network protocol.
What about git's network protocol is 'slow'?
I think I can also come up with a pretty simple experiment to prove or disprove this: 1. Fill a file with 13Gb of data and commit it. 2. Upload that to GitHub or wherever you want 3. Time how long it takes to clone and compare that to the real GitHub.com
You will find the one we made takes 'seconds' (or minutes, depending on your network connection), while the the GitHub.com will take some time.
So, same data, two different results? The difference in this experiment rules out the 'slow' network protocol as the difference maker. The real reason is that the GitHub.com repo will have hundreds or thousands of commits.
Basically, the difference is the commit history, because that's how git needs to work. Git stores the diffs for the entire commit history, not just the literal files at the HEAD. I don't know what the network protocol has to do with that.
dartos|2 years ago
Using git with bash is the best way to use git (:
funcDropShadow|2 years ago
vintagedave|2 years ago
> This is mostly a configuration issue
git apologism :)
(FWIW I do agree with the rest of your comment, and I hope you forgive the slight joke. Product users, for any product are fallible humans. That might be fallible in accidentally deleting, or it might be fallible in forgetting to turn on the safety settings.)
Very seriously, something like this should not be possible in a source control system. Data integrity needs to be built in by design.
MatthiasPortzel|2 years ago
It is built into Git by design. Git keeps commits around for 90 days even after they’re “deleted.” This is why people who understand Git were so skeptical of OP’s claim. The point that Git is confusing still stands, however.
devjab|2 years ago
We enforce a strict pull-request squish commit with four eyes approval only. You can’t force push, you can’t rebase, you can’t not squish or whatever else you’d want to do. But we don’t pretend that is the “correct” way to use Git, we think it is, but who are we to tell you how to do you?
We take a similar approach to how we use Typescript. We have our own library of coding “grammar?” that you have to follow if you want to commit TS into our pipelines. Again, we have a certain way to do things and you have to follow them, but these ways might not work for anyone else, and we do sometimes alter them a little if there is a good reason to do so.
I don’t personally mind strict and opinionated software. I too think Git has far too many ways to fuck up, and that is far too easy to create a terrible work environment with JavaScript. It also takes a lot of initial effort to set rules up to make sure everyone works the same way. But again, what if the greater community decided that rebase was better than squash commit? Then we wouldn’t like Git, and I’m sure the rebase crowd feels the same way. The result would likely leave us with two Gits.
Though I guess with initiatives like the launch here, is two Gits. So… well.
dmazzoni|2 years ago
As an example, what if someone pushes:
- A private key or password - Copyrighted content - Illegal content
In cases like this, it needs to be possible to remove the bad commit from the repository entirely.
IshKebab|2 years ago
On Windows. On Linux Git still doesn't scale well to very large repos. Before you say "but Linux uses git!", we're talking repos that are much bugger than Linux.
Also the de facto large file "solution" is LFS, which is another half baked idea that doesn't really do the job.
You sound like you're offended that Git isn't perfect because you like it so much. But OP is 100% right here; these are things that Git doesn't do well. It's ok to really like something that isn't perfect. You don't have to defend flaws that it clearly has.
WorldMaker|2 years ago
> On Windows. On Linux Git still doesn't scale well to very large repos.
All of Microsoft's solutions for git scaling have been cross-platform. Even VFS had a FUSE driver if you wanted it, but VFS is no longer Microsoft's recommended solution either, having moved on to things like sparse "cone" checkouts and commit-graphs, almost all of which is in mainline git today.
I also find it funny the complaint that git scales worse on Linux than Windows given how many Windows developers I know with file operation speed complaints on Windows that Linux doesn't have (and is a big reason to move to Windows Dev Drive given the chance, because somewhat Linux-like file performance).
graemep|2 years ago
Linux also has the huge advantage of an ecosystem, tools and integrations. It is overkill for small projects and there are friendlier alternatives for those - but git wins because it is what everyone knows. Something aimed at the small number of large projects will suffer the same problem.
Wytwwww|2 years ago
Certainly true. But it's not clear at all how does the product solve these specific problems (they say "Painless Scalability" which sounds nice but did they try developing any 100+ GB projects with massive numbers of commits/branches on it?)
Rygian|2 years ago
If a feature can lead to actual unintended data loss, it should come disabled by default. Are there any other "unsafe by default" features in Git? What would be a sane general default that prevents unwanted data loss, and why is it the case?
guax|2 years ago
Do people use it in an unsafe manner because they don't understand git and there lies a problem that could be tackled? yes.
With that, I don't think git has any feature that is unsafe by default.
couchand|2 years ago
dmazzoni|2 years ago
The commits that were overwritten by "force" are still there on the server. Any admin could recover them pretty easily. They're probably still present in the local repo of the person who ran "git push --force" too, as well as anyone else's machine who has cloned the repo.
The only way you'd actually lose data is if every single person who had a clone of the repo ran gc.
Or apparently if nobody knew about "git reflog" and nobody bothered to do a Google search for "oops I accidentally force pushed in git" to learn how to fix it.
aseipp|2 years ago
laeri|2 years ago
Kiro|2 years ago
kfrzcode|2 years ago
jasfi|2 years ago
sasham|2 years ago
lifeofguenter|2 years ago
Cloud-native and running things on “EC2” are very different things.
sasham|2 years ago
https://github.blog/2021-08-11-githubs-engineering-team-move...