/Git

Git’s Database Internals I: Packed Object Store

- Derrick Stolee tl;dr: Some basic concepts that Git shares with application DBs: (1) Data is persisted to disk. (2) Queries allow users to request information based on that data. (3) The data storage is optimized for these queries. (4) The query algorithms are optimized to take advantage of these structures. (5) Distributed nodes need to synchronize and agree on some common state.

featured in #348


Squash, Merge, or Rebase?

- Matt Rickard tl;dr: "When version controlling your code with git, there are generally three choices when merging feature branches into main. Each has its quirks, so which one should you use?" Matt runs through when to use each, and his preference. 

featured in #339


In Praise Of Stacked PRs

- Ben Congdon tl;dr: "The practice of breaking up a large change into smaller, individually reviewable PRs which can depend on each other, forming a DAG." Ben discusses advantages, including that stacked PRs are easier & quicker to review, since there are fewer changes to sign-off on, and easier to rollback if they cause breakage.

featured in #337


A 16 Year History Of The Git Init Command

- Jacob Stopak tl;dr: "How the git init command originated and how it has changed each year for the past 16 years," along with "snapshots from Git's code every year from 2005 to 2021."

featured in #263


Teach Yourself Git Without Learning a Single Git Command

- Ivan Toshkov tl;dr: "In this tutorial I’ll try to describe how git works without using git itself. Instead, we’ll create a simple, git-like system using just zip, diff, patch and a few simple filesystem commands. The idea is to build a good mental model of how git works conceptually.

featured in #253


My Favorite Git Aliases

- Ryan Davis tl;dr: I use git aliases to automate some more complicated or repetitive operations, Ryan runs through some favorites: (1) "git glg" to summarize recent commits (2) "git amend" to add content to the most recent commit (3) "git changelog" to build pull request descriptions, and more.

featured in #250


Cleaning Up Git History

- Robin Schroer tl;dr: "Every commit should make sense by itself. There is a just right size for commits, where there is nothing to add and nothing to remove. We want to add / remove / change exactly one thing in each commit." If you are struggling, that's a sign your commit is not well scoped. Robin discusses techniques, how to leverage interactive rebasing, and more.

featured in #241


This Is How I Git

- Daniel Stenberg tl;dr: "I have a very simple approach and way of working with git in curl. This is how it works."

featured in #215


A Survey Of Git Best Practices

- David Golden tl;dr: David researched articles around Git best practices for a work presentation and collated the most frequently practices, in this post.

featured in #204


SQL Queries For Git Repositories

tl;dr: "A command-line tool for running SQL queries on git repositories meant for ad-hoc querying of git repositories on disk through a common interface (SQL)."

featured in #199