/Git

How I Use Git Worktrees

- Alex Kladov tl;dr: “There are a bunch of posts on the internet about using git worktree command. As far as I can tell, most of them are primarily about using worktrees as a replacement of, or a supplement to git branches. Instead of switching branches, you just change directories. This is also how I originally had used worktrees, but that didn’t stick, and I abandoned them. But recently worktrees grew on me, though my new use-case is unlike branching.”

featured in #535


In Praise Of Small Pull Requests

- Elliotte Rusty Harold tl;dr: “Prefer small, focused pull requests that do exactly one thing each. Why?” (1) Easier to review (2) Can be reviewed quickly. (3) Easier to figure out exactly where the mistake is. (4) Less likely to conflict with other developers’ work. (5) Saves a lot of work if you made a critical error. (6) Easier to make sure each individual pull request is completely tested.

featured in #533


Writing Tips for Improving Your Pull Requests

- Jeff Mueller tl;dr: “I’m going to show you how to purposely write less by using the techniques below.” Tips are: (1) Make it scannable. (2) Speak plainly. (3) Avoid adverbs. (4) Simplify your sentences. (5) Avoid a passive voice. Jeff adds examples to each.

featured in #530


A Git Story: Not So Fun This Time

tl;dr: The origin story of Git covering Linus Torvalds' frustration with existing tools, his creation of Git in 2005, early contributors, and the rise of GitHub. The story highlights how Git emerged from a weekend project to become an essential tool.

featured in #528


Writing Commit Messages

- Simon Tatham tl;dr: “When I’ve looked at other guides, they don’t seem to be focusing on the most important things. The one that first started me making notes towards this article consisted of a 7-point list of guidelines, most of which were tiny details of the initial ‘subject line’ part of the commit – what tense to use, whether to end it with a full stop, capitalisation – and the final rule just said ‘Use the body to explain what and why vs. how’.” Simon shares his approach. 

featured in #516


Notes On Git's Error Messages

- Julia Evans tl;dr: Julia discusses various strategies she’s put into place when facing an unclear error messages in Git. “I’m going to go through a bunch of Git’s error messages, list a few things that I think are confusing about them for each one, and talk about what I do when I’m confused by the message.” 

featured in #505


What Happens on GitLab When You Do Git Push?

- Li Zhennan tl;dr: The post provides background on the internal structure of a Git repository and the Git data model, and then summarizes the end-to-end flow of a git push to GitLab over SSH and HTTP(S), highlighting interactions between the client, GitLab components, and the Git hooks. 

featured in #502


The “Current Branch" In Git

- Julia Evans tl;dr: “I’ve been thinking more about what the term “current branch” means in git and it’s a little weirder than I thought.” Julia shares 4 possible definitions and scenarios for each. 

featured in #500


Modern Git Commands And Features You Should Be Using

- Martin Heinz tl;dr: “Most people only ever touch the most basic of commands, such as add, commit, push or pull, like it's still 2005. Git however, introduced many features since then, and using them can make your life so much easier, so let's explore some of the recently added, modern git commands, that you should know about.” Martin presents Switch, Restore, Sparse Checkout, Worktree and Bisect. 

featured in #497


How HEAD Works In Git

- Julia Evans tl;dr: Julia ran a poll asking people how confident they were that they understood how HEAD works in Git. The results were a little surprising... people were unconfident about their understanding. “Usually when people say that a topic is confusing when I think it’s not, the reason is that there’s actually some hidden complexity that I wasn’t considering. And after some follow up conversations, it turned out that HEAD actually was a bit more complicated than I’d appreciated!”

featured in #496