Working with an engine like Unreal Engine for a project of any reasonable size requires working with both hundreds of thousands of active files (my current project's repo's HEAD has ~400k) and hundreds of gigabytes of active files, many of which are many GB on their own. Our repository (in perforce) is currently in the order of 10TB.
Git, even with LFS and partial clone and shallow copies and fsnotify just falls apart at this scale. Add to that the necessity for less-technical people (artists, designers, VFX, audio, etc) to use it, and it is really just a non starter.
I absolutely loathe Perforce (having used and occasionally admin'd it professionally since 2007), but I begrudgingly admit that is is currently the only publicly available VCS that can fulfill all of the requirements of this industry in a practical way. Plastic and the others just aren't there yet.
Most of this was built by Microsoft to work on Windows with git.
We moved from SVN in the late 2010’s, and holy crap man, did it change our workflows. No longer were we passing around patch files in a team for code reviews, but actually reviewing code somewhat like on GitHub. It was magical.
So yeah, solved problem thanks to Microsoft. Solved multiple times in fact, and because it's Microsoft, only not all had Linux installers: https://github.com/microsoft/scalar/issues/323#issuecomment-...
https://github.blog/2020-01-17-bring-your-monorepo-down-to-s...
https://devblogs.microsoft.com/devops/introducing-scalar/
https://github.com/microsoft/git
https://devblogs.microsoft.com/devops/git-partial-clone-now-...
How is that solved with Git?
But I’m sure you’re smarter than the whole industry so you probably know better
Manuals/guides/tutorials are the most scalable way to teach people how to do literally anything.
Hacking git into something it is not does not qualify as learning to cope with git in my book.
Apparently git does not solve all problems and there is indeed value in exploring other options and building new systems that fill other niches.
You only need this when, well, you need it. You can go a surprisingly long way (nearly a decade of daily commits by hundreds of programmers) and stick to vanilla git.
It's great that Perforce works and I've heard others in the graphics field using it, so it satisfies a need. Don't know if/when it would be a general need for say GitHub users.
Have you considered that maybe they just have a different use case than you?
Yes of course they have a different use case. That is just another way to say the same thing.
I disagree, really.
There is not fundamental reason why you cannot have user-friendly UI for 98% of the cases and some "advanced" for those 2%.
Just like GUIs have "advanced" settings, the CLI can have well designed 10 commands for basic usage that are taught to newbies and then advanced ones.
I'm, just like many other people using GitHub Desktop (or Git Kraken or Git Extension, but I dont like this one)
when I'm working in GUI environment, that's proof that it is possible.
The problem with creating 3rd party tool that's CLI wrapper is that you cannot rely on it being installed on the system.
That's why such solutions usually fail - because you risk relying on stuff that may not get traction and you'd be better sticking to "official" syntax in long run.
Other GUIs, like the ones embedded in VisualStudio, VSCode or Rider, try to sell skipping some cognitive steps for some operations as simplifying or speeding up dev flow. I find they are just offering extra (beyond what git itself offers) ways of shooting yourself in the foot.
And if anyone seriously wants to try to replace git they need to understand how git works first at the level of an advanced expert first anyway. At that point, you can have the discussion about how to make git, with better LFS/monorepo support, with a more pleasant UI/UX, etc.
2. Literally no relevant career goal is significantly obstructed by less git proficiency.
There's a lot of "useless" complexity in the Git UI. The naming of the commands and the underlying concepts are quite inconsistent. The commands themselves are inconsistent. It's rare to see somebody, even git fans, to dispute that the UI is far from optimal. And the warts in the UI are being improved.
These UI warts start to become invisible when you get used to them, but e.g. when teaching git they become painfully obvious again.
The underlying git architecture is simple and it's the simplicity that makes git powerful. Powerful tools don't necessarily need complex interfaces. In fact power often comes from simple interfaces that compose well.
When you get your repo into a state that needs reflog, it's probably not amenable to very straightforward commands. A bigger problem is that it's a bit "too easy" to get into that kind of state.
The original git interface wasn't really intended for "general use" and there was supposed to be the friendlier "porcelain" on top of the lower level "plumbing". But people started to use the plumbing directly and the porcelain never came to be.
Totally agree on your main point though. The benefits of switching are far lower than the costs.
Once you understand this, GIT makes a whole lot more sense. The trouble with failed merges is an artifact of trying to appear like it tracks deltas. Merge conflicts when you're the only programmer on a product (but have multiple computers) are maddening.
I blew away .git and everything in it, restarting a repository, more than once because I couldn't resolve a merge conflict, before I learned that simple fact.
I've got from .zip files of my source code on floppy disks, to SVN, then Mercurial, and finally GIT. GIT is amazing, though the UI is a pain, as most agree.
If you rename the file using git and that is the only change in your file, then it works:
git mv oldfile newfile
Commit that change and the rename is in your history.the tooling infers a rename based on the lack of a content change
Does nothing. Git won't remember you did it.
> and that is the only change in your file
This always works, but it means you need to choose between flaky rename detection and weird extra rename-only commits that probably don't compile.
I might be misremembering the technical details, but isn't that only the case in a git repo with zero pack files?
Will grant that the lack of metadata on renames can be issue when a file is heavily refactored alongside it's relocation.
But there is no machine-readable metadata that the commit is the same in both cases. In simple cases you can work around this by basing the patch off of the merge base but if there are conflicts that doesn't work well.
The result of this is that these two different but logically identically commits will cause future merge conflicts and make questions like "does this branch have this patch" much more difficult to answer.
This is something that I think https://pijul.org/ does quite well. Their base unit is a patch and that can be applied to multiple places. You can also have snapshots which are logically a collection of patches.
Git LFS is horrible if you mistakenly add some file(s) to LFS.
Restoring to LFS-less state is supposed to be easy but it is always very painful.
There should be a way to tell repo - I do not want any LFS at all. In practice this is painful, and it is easier to start a new repo....
Also for some reason Github/Microsoft decided to "monetize" LFS. The freebie limits are 1GB for hosting AND transfer! Then the charges get very expensive.
I am not sure why Github LFS is priced like some AWS S3 plan not OneDrive plan.
Microsoft’s homegrown LFS implementation (in Azure DevOps) does not and has never charged for LFS. It’s nice to have friends with a cloud blob storage service!
Source: I was the product manager for Azure Repos’s LFS server and am currently the product manager for all things Git at GitHub.
https://learn.microsoft.com/en-us/previous-versions/azure/de... https://github.com/microsoft/scalar
The only downside is the per-file versioning, the update needs to be run on the top directory otherwise interesting problems happen.
That being said the unfortunate truth is that many, many, many users of Git rely on the implementation as the API, directly reading and writing to all corners of the `.git` directory. So even if the core command could support something like this (or a wrapper could be provided) it would likely run into a lot of tooling issues.
The underlying model is alien to many, it requires non black box approach to get out of pits sometimes but to me it's always worth knowing.
The only decision I dislike about git is the soldered staging area idea. There's a reason why most people end up stashing 109 times a day, and I think there's a golden idea in merging the two
If you have no problems with Git, then I’m happy for you. I certainly have problems with Git, eg its inability to handle large repositories meaningfully (enjoy a Chromium checkout!), the arcane CLI commands, the shut-your-eyes-and-hope of moving commits between branches and other sharp edges.
That Git has been as resilient as it has is largely a function of being written by Torvalds and GitHub network effects. It isn’t for lack of better/as good features found in other VCS methodologies.
Nope.
So slow. It does not like millions of files. And all my tooling that does a “quick” git status locked up the terminal, vs code, etc.
Out of curiousity, what other SCM tools can pull this off better?
There are good reasons that one should keep the whole commit history to distribute a source of truth, but at the same time if one is going to place full trust in something like GitHub (as many do), there’s no reason that full trust can’t be given to a similar website that provides a Piper model with some mechanism to request more than one commit to be brought to local storage (to get more sources of truth).
End of the day, a large repo checkout is going to be limited by either your network, your CPU/storage to perform archive expansions, or frequently both. I get the impression that Android and Chromium are expanding faster than those other things are improving, but have no data to back that up.
To take your example of moving commits between branches, the git rebase parameters and --onto flag are definitely confusing, but each of them is clear and necessary when understood. The CLI could be refactored to be clearer, but the hard part is understanding what each one means, which you would need to do anyway even with a better CLI. Obviously one can work around these knowledge gaps, but once you understand them they are useful for an entire career and the warts tend to fade in importance relative to the value of a tool with the insane power-to-weight and rock solid architectural tradeoffs of git.
1. The client diff content of your commit with previous one. 2. Apply such diff on content of another commit. 3. Create a new commit with the old commit message/author of commit in step 1.
And that is also what make git work for everyone, because it is simply a directory that contains tons of new_new_updated_project on steroids. It's up to you to decide what to do with it.
Are the syntax of the commands the issue or are all CLI commands arcane to you? What would you propose to be the command syntax if you were designing it?
Going from SVN to Mercurial was a night and day experience. Going from Mercurial to Git was a marginal improvement initially but a lasting change long-term.
Then there are the "visual" VCSes like Rational and TFS that are designed to _only_ work within an IDE and grokking them involves wading through hundreds of pages of corporate tech docs.
VCSes (or at least the ones I used) were generally awful before Git.
Whatever effort you are putting into seeking or building an alternative, instead put that effort towards becoming a Git expert.
building an alternative naturally is more work than to learn git for one person, but not everyone needs to do that. a few people building an alternative could save the learning effort of many more people.
instead i'd like to point out a different reason why rebuilding git may not solve the problem:
git is good because it is powerful and flexible.
that power and flexibility by necessity makes git more complex and difficult to use.
you can build a simpler system, but then half of todays git users won't be able to use it because it won't have the features they need.
and a system that has all the features of git today and also solves the problems it currently has will be even more complex and less straigt forward to use.
the best approach is probably to have a common backend that has all the power and flexibility needed, and multiple different frontends that are simplified to only expose the features needed for a particular workflow.
Git solves the deeply complex problem of distributed version control. Most complaints about git are actually complaints about the essential complexity of the problem, not the accidental complexity of the tool used to solve it.
I want to share 5k LOC with a colleague. Anyone who thinks that requires a decentralised solution in 2023 is unwell.
I recently wasted a few hours because I forgot to fetch before running some code. Sure the UI could be better (if you're very tired and you're told you're up-to-date you'll stupidly believe it), but fundamentally the 'feature' that caused this problem is something I'll never use. I'm always going to code with a connection to the internet. I shouldn't need to mentally keep track of local vs remote because that distinction simply shouldn't exist.
The repos I work on are often smaller than the average webpage, I'm really not buying the idea that in the age of HD streaming bandwidth-concerns are an issue here.
Incidentally none of the teams I've worked on ever even use any git features like bisect. The cult of git means everyone has to use git, even though for most people that just means many hours wasted googling with absolutely nothing to show for it (as in git is strictly inferior than just sharing files across a networked drive for many teams' use-cases).
Meanwhile, others work in airplanes and in the woods.
Not using git bisect is your loss. I'm very happy it exists, and wouldn't trade git for just files on network drives.
You can absolutely build a system that pushes (some of?) your branches on every commit.
For me personally, that'd be annoying; every time I talk to the git server, I want to insist on a Yubikey touch.
Probably the only thing that makes me not miss SVN too much.
Git really needs a good git tutor game.
Like vim tutor or any one of the n*x/shell games.
I'm old enough to have used CVS, SVN and then a bit of git.
I remember the big selling point to go from CVS to SNV was "you can put binaries in there!" ... which we never did.
And now I see the selling point to go from SNV to Git is "you can do really complicated stuff like rebase".... which we've never done.
For a team who just does run of the mill distributed version control stuff (commits, diffs, blame, conflict resolution), can you explain why git is such a huge benefit over SVN?
It can't display me the branch I'm working on, starting from the commit that began the branch, until the last commit. (Or if it can, I have no idea how to do it.)
This isn't a functionality issue, but rather a conceptual one. Git just fundamentally thinks of branches differently than I do. (And, maybe most humans?) To me, a branch begins ... when I branch it. To git, a branch begins ... at the very first commit ever in the repo, since they consider commits that were made before the branch point to still be part of the branch. The branch point then is just another commit to git - and not even one that they think is important enough to highlight. But without any ability to clearly identify the branch point, you can often find yourself looking through a forest of commits that are irrelevant to what you're really searching for.
I spent the better part of an hour the other day trying to figure out how to identify my branch point. (For the record, the best solution I eventually found was: cat .git/refs/heads/<branch name>.) Just my $0.02, of course, but IMO this is absurd - and a big feature gap / user friendliness issue with git compared to other VCS's.
IMO git is just another step in the evolution of VCS's, and not necessarily even one of the better ones. Its concepts, functionality, and feature set are focused primarily on distributed development and multiple people maintaining different source trees ... which is fine for the Linux kernel and other projects that heavily use that use case. But many/most projects don't work that way, and for them a centralized VCS is sufficient. I have no doubt that a better VCS will come along and replace git one day.
git log <base-branch>..<branch>
I often need the count of commits, usually for build IDs, git rev-list --count <branch> ^<base-branch>
I usually use gitk for visualizing branch commits. CLI equivalent is git log --graph --oneline --all
I’m not that old, but I’m old enough to have used RCS, CVS, SVN, then finally Git. I started using Git super early, before GitHub existed. You may not believe me, but Git was the answer to all my prayers. All those previous systems had fundamental architectural flaws that made them a complete nightmare to use on a team for any serious work.
Git has no such problem. There’s nothing it can’t do. Instead, the only limitation is on the user being able to know how to get Git to do what they want it to do. Thankfully, that’s always solvable with a quick read of the documentation or web search.
I understand that people might want to make it easier, since the UI is complex, but that’s never going to work. If you abstract away the complexity of the UI, you will necessarily abstract away the power. If you abstract away the power, you are no longer solving all the problems that Git solved. People just don’t realize what problems are being solved because they never lived through those problems with the previous VCSes.
You know what’s easier than building a new VCS better than Git? You know what’s easier than using a different VCS from the rest of the world? You know what’s easier than designing a miraculous abstraction on top of Git?
Learning Git.
Whatever effort you are putting into seeking or building an alternative, instead put that effort towards becoming a Git expert. It will be a lot less effort with a lot more benefit. Trust me on this. It will be well worth it for your career and for your personal computing life as well.