tl;dr:“I always wish that command line tools came with data about how popular their various options are, like: (1) “basically nobody uses this one”. (2) “80% of people use this, probably take a look”. (3) “this one has 6 possible values but people only really use these 2 in practice.” Julia asked about people’s favourite git config options and shares the responses.
tl;dr:"One of the most common problems I see folks struggling with in Git is when a local branch (like "main") and a remote branch (maybe also called "main") have diverged. There are two things that make this hard: (1) If you’re not used to interpreting git’s error messages, it’s nontrivial to realize that your main has diverged from the remote. (2) There's no single clear way to handle it - it depends on the situation and your git workflow." Julia discusses what to do.
tl;dr:Julia provides a short explanation of each part of your .git directory helps develop your mental model and better understanding: (1) How merges and rebases work and how they can go wrong. (2) How exactly your colleagues are using git, and what guidelines you should be following to work with them successfully. (3) How pushing / pulling code from other repositories works. (4) how to handle merge conflicts.
tl;dr:"I’ve been extremely slowly trying to figure how to explain every core concept in Git (commits! branches! remotes! the staging area!) and commits have been surprisingly tricky. Understanding how git commits are implemented feels pretty straightforward to me, but it’s been much harder to figure out how other people think about commits. So like I’ve been doing a lot recently, I went on Mastodon and started asking some questions."
tl;dr:"The main reason I wanted to make this was to give folks some intuition for how git works under the hood. After all, git commits really are very similar to folders – every Git commit contains a directory listing of the files in it, and that directory can have subdirectories, etc... It’s just that git commits aren’t actually implemented as folders to save disk space. So in git-commit-folders, every commit is actually a folder, and if you want to explore your old commits, you can do it just by exploring the filesystem!"
tl;dr:Julia discusses an intuitive mental model that many people have, how git actually represents branches internally i.e. branches are a pointer to a commit, how the “intuitive model” and the real way it works are actually pretty closely related and some limits of the intuitive model and why it might cause problems.
tl;dr:"One of my biggest problems is that after almost 15 years of using git, I’ve become very used to git’s idiosyncrasies and it’s easy for me to forget what’s confusing about it." Julia asked folks "what git jargon do you find confusing? thinking of writing a blog post that explains some of git’s weirder terminology: “detached HEAD state”, “fast-forward”, “index/staging area/staged”, “ahead of ‘origin/main’ by 1 commit”, etc."
tl;dr:“None of these things feel super surprising in retrospect, but I hadn’t thought about them clearly before. The facts are: (1) The “index”, “staging area” and “–cached” are all the same thing. (2) The stash is a bunch of commits. (3) Not all references are branches or tags. (4) Merge commits aren’t empty.” Julia discusses each in detail.
tl;dr:When you face a topic that’s hard to understand, you are likely not alone. Julia talks about how to move folks from the "I really don't get it" column, to the "okay, I can mostly deal with this” column using some of the following tricks: sharing useful tools, sharing references, telling a chronological story of what happens on your computer, turning a big list into a small list of the things you actually use, showing the hidden things, and demoing the tool. Julia gives examples of how these have made learning for her easier.
tl;dr:Julia explores the inner workings of git, specifically how it stores files in the .git/objects directory. Through Python programs, Julia investigates the location of specific files and their older versions discovering "content addressed storage," where the filename is the hash of the file's content. The article also demystifies the encoding process, showing that files are zlib compressed, and emphasizes that git stores complete files, not just the differences.