index.md (4272B)
1 --- 2 title: "Useful and interesting Git posts" 3 date: 2024-02-11T20:00:20-08:00 4 lastmod: 2024-12-16T15:35:48-08:00 5 description: "This is just a collection of interesting (and not necessarily recent) Git posts from around the web. I will update this as I find new things." 6 draft: false 7 categories: 8 - Programming 9 tags: 10 - Git 11 --- 12 13 This is just a collection of interesting (and not necessarily recent) Git 14 posts from around the web. I will update this as I find new things. 15 16 ## Introductions 17 18 [Mikkel Paulson --- Git is my buddy: Effective Git as a solo 19 developer](https://mikkel.ca/blog/git-is-my-buddy-effective-solo-developer/) 20 21 I love reading about how other people use Git, and like Mikkel I am usually 22 using it as a “solo developer”. It’s interesting how different his approach 23 is from my own. I think that’s partly due to us being in different lines of 24 work (I haven’t been paid to put anything on the web since the 1990s), but 25 it also suggests that I could be doing things better. 26 27 [Sandra Snan --- The life-changing magic of 28 git](https://idiomdrottning.org/git) 29 30 A nice introduction to Git. I really appreciate how it defines the most 31 common pieces of Git jargon. 32 33 ## Understanding Git 34 35 [Nick Farina --- Git is simpler than you 36 think](https://nfarina.com/post/9868516270/git-is-simpler) 37 38 This is an older post, written at a time when many programmers were still 39 using Subversion, and it’s worth checking out for the vintage screenshots 40 alone. But it also serves as a great introduction to what Git is doing 41 under the hood. 42 43 [Julia Evans --- Inside .git](https://jvns.ca/blog/2024/01/26/inside-git/) 44 45 This comic (with accompanying text) goes even deeper into what Git is 46 actually doing. A “Git repository” is just regular directory full of source 47 code (or whatever) called the “working copy”, plus a .git directory 48 containing a collection of special files. This breaks down all those files. 49 50 [Tom Preston-Werner --- The Git 51 Parable](https://tom.preston-werner.com/2009/05/19/the-git-parable.html) 52 53 Another introduction that invites the reader to imagine making a series of 54 decisions that would result in a system that behaves exactly like Git. My 55 [frequent complaint]({{< relref "posts/design-everyday-programs/" >}}) about 56 Git is that you have to know _how_ it works to use it well. If you read this 57 piece, you’ll get a long way toward that goal. 58 59 ## Opinions 60 61 [Dan Kelch --- Nobody cares about your Git 62 history](https://spin.atomicobject.com/git-history/) 63 64 You can ignore the provocative title (or appreciate it), but really this is 65 good guidance on how to think about rebasing vs. merging. 66 67 [Alex Kladov --- Git 68 things](https://matklad.github.io/2023/12/31/git-things.html) 69 70 “A grab bag of less frequently talked about git adjacent points.” The stuff 71 about CI and code review is always fascinating to me---a “solo 72 developer”---a window into a whole other world of writing code for a living. 73 The tips for working on merge commits are great, and I’ve adopted Alex’s 74 advice on moving files and starting with empty commits 75 76 [Chris Beams --- How to Write a Git Commit 77 Message](https://cbea.ms/git-commit/) 78 79 I can’t endorse any of Chris’s cryptocurrency advice, but this is the best 80 post on why and how to craft commit messages. This post introduced me to the 81 [use of the imperative mood](https://cbea.ms/git-commit/#imperative) for 82 commit subjects. I.e., “a properly formed Git commit subject line should 83 always be able to complete the following sentence: ‘If applied, this commit 84 will _your subject line here_’.” 85 86 ## Intermediate Usage Tips 87 88 [George Brocklehurst --- Auto-squashing Git 89 Commits](https://thoughtbot.com/blog/autosquashing-git-commits) 90 91 I didn’t really get on board with a rebase-based workflow until I learned 92 about autosquashing. I now always run `git config --global rebase.autosquash 93 true` when I’m setting up a new account. 94 95 [Adam Johnson --- Force push safely with `--force-with-lease` and 96 `--force-if-includes`](https://adamj.eu/tech/2023/10/31/git-force-push-safely/) 97 98 I was unaware of these options before I saw this post. I still hardly use 99 them---I’m still not sure if it’s a good idea to force push to a remote most 100 of the time---but if you’re going to do it you ought to include these.