this post was submitted on 03 Mar 2024
1097 points (97.8% liked)

Programmer Humor

19564 readers
860 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 34 points 8 months ago (9 children)

Once you understand that everything is similar to a tag, like branch names are basically tags that move forward with each commit, that HEAD is a tag that points to your current commit location in history, and what command moves what kind of tag, it becomes easier to understand.

Suddenly having a detached HEAD isn't as scary as you might think. You get a better understanding of fast forward merges vs regular 3-way merge.

Also understanding that each commit is unique and will always remain in the history and can be recovered using special commands. Nothing is lost in git, unless you delete the .git sub-directory.

[–] [email protected] 13 points 8 months ago (1 children)

For folks unaware, the technical git term, here, is a 'ref'. Everything that points to a commit is a ref, whether it's HEAD, the tip of a branch, or a tag. If the git manpage mentions a 'ref' that's what it's talking about.

[–] [email protected] 3 points 8 months ago (2 children)

Right. I just wanted to keep it as simple as possible.

[–] [email protected] 3 points 8 months ago

Oh, no worries, just figured I'd add that extra little bit of detail as it's a useful hook into a lot of other git concepts.

[–] [email protected] 2 points 8 months ago (1 children)

Honestly I've come to realise that being precise is the simplest in the long run

[–] [email protected] 2 points 8 months ago

People get overloaded with words. You have to focus on one concept at a time. Let them ask for others.

load more comments (7 replies)