Hacker News new | ask | show | jobs
by Certhas 3116 days ago
The directed acyclic graph is fine.

But that is not really the structure once we start having more than one git repository interacting with remotes. And then there is the staging area and the stash. Tracked untracked and ignored files. There's just a lot of state, and a lot of duplication, where the same result can be achieved in various ways.

Git is a disaster for version control. It excels for one particular use case, and user type. Because of this it has become ubiquitous, and now we need to teach it to everyone.

Part of my work is getting scientists to use version control. I kid you not, there are many here who follow the advice: Before you try to put it into git, make a backup.

And that's sane. Because who the hell knows what will happen once you push the commit and then some changes are merged in, or even worse, the merge fails, etc...

The unwillingness of a large number of HN commentators to see the weaknesses of git is astonishing to me.

2 comments

> Part of my work is getting scientists to use version control. I kid you not, there are many here who follow the advice: Before you try to put it into git, make a backup.

I know some that won't delete code. If they need to change something, they leave the previous code commented out. They don't merge, either. All changes are manually applied to every branch. They don't trust SVN, despite having used it for years.

I don't know why you think it would be better with hg. You can lead a horse to water, but you can't make him drink.

> The directed acyclic graph is fine.

> But that is not really the structure once we start having....

Well, yes, the DAG of commits with trees and blobs attached to them is still the structure of the underlying database, which is what you were originally talking about. But OK, you want to talk about the complexity that arises from git being distributed and having a staging area. That's totally valid, and it's what simplified wrappers like gitless are here to solve. Maybe try those?

> Git is a disaster for version control. It excels for one particular use case, and user type.

So, because git is excellent at its intended use case, it is a disaster for version control in general? OK...

> Part of my work is getting scientists to use version control.

Well, maybe your scientists should be using some other version control tool if they are having so much difficulty with git?

I am a big fan of gitless. It shows how things could be better with the same underlying structure.

But the standard git interface can not realistically be avoided either. Whether IntelliJ or Atom git plug in, they are all closely modelled on the git commands.

We also have a considerable number of people working on Windows.

The disaster is that because the open source community has entirely embraced git, git is no longer optional. We could try to teach people two tools (pushing git off until later), and it's something we have considered, but that has obvious downsides, too.

It's still something we will investigate, but we are in an extremely resource strapped environment. Time, IT staff, etc...

On a technical note, a single DAG that you append commits to is vastly different from a number of DAGs (technically a directed acyclic forest) that interact in non-trivial ways. So no, the DAG is not the underlying database, it is just a part of it.

Failing to make this distinction is how we end up with millions of tutorials explaining the easy part, and plenty of smart users that still end up with messed up repos.

Yes, the distributed part is hard to wrap your head around. But IMHO, hiding it is even worse because you'll always be wondering what exactly is going on. Whereas with git you just check the status and the current DAG to figure out where you are.
But it's not so easy to just check the status of the repo I am pushing and pulling from. Is there a UI that will show me side by side the two DAGs that are being coordinated through push/pull?