Lurker News
Back to discussion

Comment by dasil003

dasil00310 replies#
Disagree strongly on git. On the surface the syntax is ugly, but the data model is brilliant.

Once you wrap your mind around what commits, heads and remotes are and learn to rebase you get an incredibly simple and fine-grained control. I never use stash because it's trivial to create a WIP commit and rebase later into the chunks I want to ship to permanent history.
Git is like a chef's knife: extremely powerful tool that's dangerous in untrained hands.

millimeterman4 replies#
I think the best argument against git is to use mercurial for a few months. It has exactly the same functionality but a nicer and more streamlined interface, especially when it comes to branch management.
nickpeterson1 reply#
Yeah, when dvcs started becoming all the rage I tried mercurial first for some toy projects and really liked it. When I finally had to start using git I was absolutely baffled that it had won. I feel like git needs something that sits on top and does most the normal configuration and wraps the api. It reminds me of the problem with emacs, there is so much it’s just overwhelming to people.
smichel17#
Technically this already exists; git commands are divided into two groups, plumbing and porcelain. Plumbing commands have stable interfaces and are intended for building alternative interfaces with; porcelain commands are intended to sit on top and be the actual user interface. They're what you're used to using.
smichel171 reply#
Do you think mercurial has a better data model, or could git reach parity with just a better interface?
millimeterman#
I don't know anything about mercurial's internal data model, so it's hard to say. In particular, it makes some fundamentally different choices (e.g. no staging area, the ability to use unnamed branches). I certainly think git could do a lot better with its interface though.
dreamcompiler2 replies#
I love mercurial but since I've gotten used to git I miss the lack of the staging area and stash in mercurial. I have to grudgingly admit they're very useful.
ptx#
In some cases (all my usecases, but perhaps yours are different) the staging area can be replaced by some combination of "hg commit --amend" and "hg commit --interactive" - or in older versions "hg rollback" and "hg record".
arp242#
I think this point can be concisely summarized with:

  $ git help commit | wc -l
  506

  $ hg help commit | wc -l
  59

  $ hg help commit -v | wc -l
  96
Also, git currently has 169 subcommands by default, vs. mercurial's 50 (more available as extensions though).
daenz1 reply#
I agree on these points, however many developers don't care enough to use it well, so you get screwed up shared histories, bad commits, mis-merged branches. I know that the nature of a shared tool, but it definitely negates a lot of the potential benefits of doing everything The Right Way if nobody else puts in the same effort.
kubanczyk1 reply#
How about putting some tought into not naming operations so that `pull` is not the opposite of `push`.

Don't you think the merge histories of all the repos throughout the globe would be greatly improved if people didn't need to learn the hard way that if your colleague does `push` you need to `fetch`?

smichel17#
Also, rm is not the opposite of add, `restore` is (and previously `checkout` was).
tryptophan1 reply#
Agree. I always hated git and thought it was so arbitrary and unhelpful. Then I sat down for 1-2 hours and read about how it works. It's not that complicated of a model that it operates on. Once you learn the model, the rest of the commands and how it works start making intuitive sense.
vin0473 replies#
I’ve yet to find a good intro doc that explains how git works conceptually. There are too few visual examples with authors assuming that users already understand the basic concepts like commits. To people who are completely new to version control, git can appear nonsensical.

Funnily enough I think Atlassian/Bitbucket comes close to a good intro doc to git on their site complete with a visual guide. I still found it inaccessible to people totally new to the basic concepts though.

Continue this thread — 1 reply

kevsim#
For me personally I find git to be relatively painless (after years of svn and P4). But working with people in less technical roles (PM/UX) who for whatever reason need to touch git occasion, I’m exposed to how inaccessible it is for the uninitiated. Not saying that’s a good reason to change the tool but maybe there’s room in the market for a more accessible tool.
y73 replies#
I use git a lot, and I like the speed and decentralized nature. But I do think there's much to be improved.

Named branches don't really exist in git: there's only a moving target name that refers to a leaf node. This means there's no "history" associated to a branch except for the parent commits. But in merge commits with several parents all parents are considered equal, and the system does not contain info about which commit belonged to the "main branch" and which was imported in. This information can be valuable in some cases. This leads to a lot of rebasing just to keep the commit log clean, but this actually rewrites history and destroys information.
Also, there's no support for keeping two parallel views of the same repository (for example, an internal view with lots of subcommits, and a cleaner public view with more detailed messages, and perhaps fewer privacy-compromising names/timestamps).
Finally, handling merge conflicts is still a PITA, especially on LaTeX documents.

skeppy3 replies#
What about a “git init-lite” option?

So many times I want to VC a directory but don’t care about commit messages, branching, or other jazz more suited to collaborative work.
With init-lite, all the power of Git is still there - and you can use any commit or command you want, but it’s default would be to simply VC for every file save. In other words, a file save IS a message-less commit.

sangnoir#
The good news is that git is extensible enough to support this use-case. You would need to wrap git with a tool/script that watches for file changes
still_grokking4 replies#
Sine decades I wish this would be a std. OS or FS feature!

Continue this thread — 4 replies

icebraining#
This exists: it's the git-annex assistant! You just have to configure the "annex.largefiles", because by default git-annex doesn't actually commit the content of the files, since it's designed to handle large binary files.

But if you set that option and run the Assistant, it'll auto-commit files when they change, and can even auto-sync them with other computers, cloud storage, Android devices, etc.
https://git-annex.branchable.com/assistant/

nyanpasu642 replies#
> But in merge commits with several parents all parents are considered equal, and the system does not contain info about which commit belonged to the "main branch" and which was imported in.

I thought that merge commits stored an ordered list of parents, and the first parent is generally the main branch, and second parent is a side branch.

Continue this thread — 2 replies

Continue this thread — 1 more reply

Continue this thread — 5 more replies