Email or username:

Password:

Forgot your password?
Top-level
Julia Evans

i'm always a bit frustrated when people look at all this confusing terminology and respond "oh yeah but all you need to understand is that everything in git is a reference". Like -- sure! That's a useful thing to understand!

But there are a bunch of different kinds of references (branches, tags, remotes, the stash) and git's commands affect them in different ways. You actually do need to understand how they all work and git’s terminology doesn't do a lot to help you do that.

18 comments
cliffle

@b0rk I'm really glad you're compiling all of this, I've always felt like git managed to have most of its terminology designed exactly backwards. It confuses _everyone_ at some point.

Quixoticgeek

@b0rk "all you need to understand is everything is a reference"

My reply would be "so all I need to do is read all the source code to understand how to use this ?"

Alas far too common in the foss world these days :(

Rachel Rawlings

@b0rk "You have to understand everything is a reference" as if references haven't been biting C programmers in the face for nigh forty years.

Kevin Granade

@b0rk right, tags for example act very differently to other kinds of git references, and they have special metadata you can attach to them.
"It's all references" can help when understanding branches, but it falls apart when it's time to build a tagging workflow into your release process.

Graydon Hoare

@b0rk Yes! And that there are always at least 3 copies of all references in play at once (yours, the remote's, and your most recently-made copy of the remote's). The mental model is quite a lot to internalize, as powerful as the resulting tool may be.

Jeff Miller (orange hatband)

@graydon @b0rk Gollum Wiki was a puzzle at first because it doesn't look at the checked out workspace but only the local branch head. Pay no attention to the filesystem behind the curtain...

Luis Villa

@graydon @b0rk As someone who honestly has stopped contributing anything that can’t be done via GH web interface in part because I find git monumentally confusing, I wonder if jj (which looked very promising to me, a no-longer-active-dev) actually does what it promises to remedy some of these mental model challenges? Or is it off on the wrong track?

github.com/martinvonz/jj

Julia Evans

@luis_in_brief @graydon i haven't figured out how to get jj to compile yet but I want to try it out! definitely curious about it

Robert Atkins

@b0rk @luis_in_brief @graydon All I ever understood from the “plumbing va porcelain” debate was that git might be a very good foundation for a usable version control system, if only someone would use it to build one. Is this it?

Dan W

@b0rk The thing that gets me about git terminology isn't any one specific term (though I have problems with plenty), it's the lack of a consistent metaphor.

Are we operating on tree that have trunks and branches and pick cherries? Are we on a river where we go upstream and downstream? Are we adventurers that need to reset our basecamp and merge with other groups? All of the above!?

Joachim Wiberg

@b0rk everything seems easy when you know how it works. I’ve used got for a loooong time and I’m not ashamed of admitting I don’t really know what I’m doing.

Drew Breunig

@b0rk Understanding everything is a reference does not explain the at least 4 different metaphors going on in their UX!

Drew Breunig

@b0rk Upstream/downstream, head, branch, fast-forward, checkout, base...Ok, at least 6.

Drew Breunig

@b0rk Gonna fund a new X Prize: identify a unifying metaphor for git.

gkrnours

@b0rk in a way, a head is a tag floating at a top of a branch while an actual tag have sunk in the ground (truth?). The stash are also tag to free/lost bit of code but to me, stash being long lived feel more like an implementation mistake or a quick fix to a practical problem than a real feature

Sinjo ✌🏻💖

@b0rk 100% Also the way the CLI refers to references can be confusing as heck.

I didn’t reply because I saw someone else already mentioned it, but ^ and ~ always trip me up. Like I know ^2 is something about the second parent branch, but I can never remember which way round the branches are.

Go Up