←back to thread

1062 points mixto | 3 comments | | HN request time: 0s | source
Show context
scrapcode ◴[] No.42942555[source]
I can't help but feel that Git has completely missed the forest through the trees that you can make a 30+ part guide explaining how to use it.
replies(6): >>42942641 #>>42942672 #>>42942768 #>>42943372 #>>42950299 #>>42954886 #
verandaguy ◴[] No.42942672[source]
Eh, yes and no.

Git porcelain stuff's plenty good for probably 95% of users. `rebase -i` comes with a guide on which commands do what, and you could write a couple of paragraphs about how to format `git log`'s output with your own preferences and tradeoffs -- and porcelain usually includes stuff as eclectic as `git gc`, `git fsck`, and `git rev-parse` by most accounts.

Git plumbing's definitely a bit more obscure, and does a bunch of stuff on its own that you can't always easily do with porcelain commands because they're optimized for the common use cases.

TL;DR: while Git's big (huge even), a lot of what it provides is way off the beaten path for most devs.

replies(2): >>42942997 #>>42946334 #
ujkiolp ◴[] No.42942997[source]
not my experience - almost always some edge case leads me to a git rabbit hole

tldr: even if you never plan to use anything advanced, you’ll end up in some weird situation where you need to do something even if you’re in the “95% of the users”

no shade, yes ofc you “could this, could that” to make things work and we have been stuck with this for so long that an alternative doesn’t even seem plausible

replies(1): >>42944088 #
sampullman ◴[] No.42944088[source]
I can't remember the last time I ended up in a weird situation, I stick to basic options with init,clone,fetch,checkout,branch,commit,rebase,remote,log,stash,cherry-pick,blame,config.

It did take maybe a year or so to develop the mental model of the how commands map to the underlying structure of commits, and another few years to avoid footguns (like always "push --force-with-lease").

So I think it is probably too complicated and would be happy to switch to a better alternative if one comes up, but what seems really implausible to me is going back to the bad old days of SVN.

replies(2): >>42944184 #>>42944903 #
ujkiolp ◴[] No.42944184[source]
>It did take maybe a year or so

we have normalized this for git - a tool to store versions of text. That’s the problem

replies(2): >>42944793 #>>42945144 #
kortilla ◴[] No.42945144[source]
Maybe you’re young, but git is better than all of the other shit before it.

Try to come up with something simpler than git, and you’ll end up with something like SVN or CVS that struggled with more than a couple of people working on the same files.

Try to make something that is more content aware, and you’ll find out how git got its name in the first place.

replies(3): >>42945486 #>>42945638 #>>42995450 #
1. nextaccountic ◴[] No.42945486[source]
Mercurial is simpler than git. It is (or was) just too damn slow
replies(1): >>42947706 #
2. Izkata ◴[] No.42947706[source]
For some people. Back when I only knew how to use subversion, I tried out both git and mercurial, and found mercurial confusing while git clicked immediately.

Unfortunately it's been long enough I don't remember details why, just that it was something with how it handled branches.

replies(1): >>42967251 #
3. capitainenemo ◴[] No.42967251[source]
Mercurial has both "real" branches (history is kept so you can always tell what revisions were in what branch) as well as git "branch is just a pointer tag"

So really you can choose whatever suits your needs.

Personally the things I love about mercurial are:

    more consistent commandline (that's the simple part others bring up)
    revsets (awesome query language for revisions, there's also filesets, but I don't use that as much)
    absorb  (I think someone added a git extension that does something similar a few months ago)
    fa --deleted 
    grep --all  
    phases ♥