38 posts total
12
I really love https://diffdiff.net for quickly looking at diffs -- it does a great job of highlighting diffs inside a single line used it yesterday to debug a networking issue by diffing two tcpdump outputs and it was SO helpful, it made it immediately obvious that the MSS was different between the two connections (the screenshot isn't the actual bug, just a diff of two tcpdump outputs)
Show previous comments
@b0rk git-diff can be used with the files outside of the repository and you probably already know about its --color-words option. Otherwise there's https://github.com/ymattw/ydiff and is multiple forks called cdiff. @b0rk `git diff --no-index before after` can be nice too, if you have configured a nice diff pager like delta! i quit my job just over 5 years ago to explain computer things (https://jvns.ca/blog/2019/09/13/a-year-explaining-computer-things/). I had no idea if I would like being my own boss but ultimately it's been really cool and I'm happy to have this weird job writing zines about computers. ("I’m not planning to hire employees or anything” turned out to not be an accurate prediction, now I work with 2 part-time employees who I don't know how I would manage without)
Show previous comments
@b0rk someone asked me recently how long it took me to get used to the rhythm of working for myself and I said “uh, maybe 3 years?”. I thought working for myself would be hard to adjust to and it was, but I'm happy I did it anyway the debugging manifesto poster I've been talking about is finally available for sale! You can get it here for $20 US + shipping: https://store.wizardzines.com/products/poster-debugging-manifesto it was redesigned and riso printed by Inner Loop Press and I'm SO delighted with how it turned out (https://www.innerloop.press/)
Show previous comments
@b0rk I was sitting next to another programmer who, after much trying, threw his hands up and exclaimed, "Well, it won't work," then a half-hour later had it working. A puree of 2 and 4. it's been really fun to see zines in libraries -- the folks from Swarthmore (https://www.swarthmore.edu/news-events/diy-publications-find-a-home-mccabe-library) sent me this photo of How Git Works in their zine library
Show previous comments
@b0rk thanks for the post. I learned new things from it. I love your approach to learning. I did a similar investigation some time ago. In the end I made a game in the terminal to make it more interesting. :)
Show previous comments
@b0rk I was wondering if this was Risograph, or something similar, because it feels so perfect for that. Awesome. I know $12 USD is a lot of money for some people, so to celebrate 1000+ sales (!!!), I'm giving away 1000 PDF copies of How Git Works (honour system: only if $12 is a lot of money for you!) Here's the link, enter code BUYONEGIVEONE at checkout to get a free copy https://wizardzines.com/zines/git/ (it'll ask you for a billing address but you can enter a fake address if you'd prefer)
Show previous comments
I think a lot about how 1. a lot of command line UIs are kind of bad anyway i've been trying to summarize my relationship with git (which I love) in a single panel and this is where I landed today knowing where you are in git https://wizardzines.com/comics/knowing-where-you-are-in-git/
Show previous comments
poll: do you use git on the command line or in a GUI? (you can pick more than one option if it’s a mix of both, sorry magit users I didn't have space for you in this poll) Anonymous poll
Poll
command line, regularly
1,832
0%
GUI, regularly
666
0%
command line, occasionally
290
0%
GUI, occasionally
0 people voted. 375
0%
Voting ended 1 March at 13:22.
Show previous comments
@b0rk I voted command line + GUI, with the latter being for my Magit usage (and I guess Github blame view). I use the command line for pull, rebase, log, diff, and many blame operations. I use Magit for committing things, especially selective commits, and thus for checking diffs before I commit and so on. (And some use of git-timemachine in Emacs to move back and forth through the history of a file to track things.) But my git use is odd since I track and monitor a lot of upstream repos. I work in IntelliJ, and it’s Git UI is so good (or I spent enough time to get used to it’s rough edges, too), that I feel much less productive on the CLI. I wonder why IntelliJ users still use the git CLI, esp. for staging, writing commit messages, diffs and git blame. But also branch operations and git log are good enough or even really good, depending on the use case. I totally recommend the interactive rebase UI! i really appreciate that we can have great conversations here on mastodon if I’m extremely careful about every single thing I post and often include disclaimers (“please don’t explain rebase to me”) to avoid repetitive annoying replies that I can predict but I still feel like I need to be SO much more careful about my posts than I was on Twitter and I wish it wasn’t like that
Show previous comments
@b0rk FWIW I like reading your posts. At the moment, I really need reading about tech stuff from the perspectives of people who *aren't* total assholes. For myself I gave up on writing anything substantial online for many reasons, one of which is that I don't have the psychological constitution for potential large audiences (and hence, maintaining a "real" social media presence). I wish it wasn't like this, and I hope doing what you do doesn't burn you out. @b0rk I feel you. Try to ignore this stuff if you can. You're doing important work here 🙏 @b0rk This has been my experience as well. And I’m a middle-aged white dude. I imagine it’s even worse for people in other demographics
Show previous comments
@b0rk There's a fourth option though: The "student has their first merge conflict, panics and tries to sort it out themself instead of asking for help"-option. - Checked in conflict-markers: ☑️ @b0rk Perfect. What an elegant way to represent commit graphs. And thank you for articulating my dread of merge graphs A squash + rebase looks almost ideal to me. I'm going to do that more often. The negatives of squash + rebase look minor to me though. Is a 3000-line PR any better with the other options?
Show previous comments
@b0rk this is making me want to finally sit down and work through https://shop.jcoglan.com/building-git/ where you build a simplified working git clone @b0rk great content! (As always). I recently found https://pre-commit.com/ as a really useful tool for distributing coding standards inside a git repo. A bit different than what your current content, but one of worst sort of merge conflicts on teams is formatters gone rogue, IMO. do we think of git commits as diffs, snapshots, or histories? https://jvns.ca/blog/2024/01/05/do-we-think-of-git-commits-as-diffs--snapshots--or-histories/
Show previous comments
@b0rk Thanks, I liked that! This post woke something in me re the discussion on rebase vs merge the other day. I think I prefer rebase/linear history because it maps very well to a sequence of patch files that could be copied around and applied independent of git itself. Not sure why that feels so "pure" to me, but it does. @b0rk Speaking of this, before git, I worked a lot with monotone, which has quite a lot of similarities to git... however, storage wasn't one of them. Monotone stored commits as diffs, so there were situations where they had to be replayed en masse. That could be quite a performance hit...
Show previous comments
a bunch of folks have mentioned that they use rerere to avoid solving the same merge conflict a million times during a rebase. If you use it, do you find it works well? are there any downsides to using it? @b0rk If rebase is going badly I sometimes do `git reset main` instead and craft the commits I need. A lot of the times it’s a single commit anyway! @b0rk I literally told my 2 juniors today to stop force-pushing rebased versions of their PRs to GitHub if there are already comments on some of the old commits, and to instead merge over them... turns out a lot of nice GitHub stuff breaks when you rewrite history it's happening!!! from now until the end of the day on Friday, all my PDF zines are 50% off with the discount code WIZARDPDF print zines are 30% off with the discount code WIZARDPRINT
Show previous comments
Show previous comments
@b0rk Another great article, thanks for writing and sharing. With checkout the '--' can be used between a branch and a file on that branch and it will copy that file from that branch to the current one. Kind of like cherry-picking files rather than whole commits. git checkout -b new_feature # Create and checkout a new branch @b0rk This is very helpful for git newcomers. The one that always terrifies me is getting "yours/theirs" wrong. working on sketching a few different git workflows I've seen people use. what am I missing? (I'm less interested in minor variations on these like how you manage tags or the exact details of how the feature branches work and more interested in completely different workflows) @b0rk I'd only say that for me, I only push to main for something like my personal site and minor changes. Otherwise I use branches even on tiny teams or if working on a feature that is more than a minor change. @b0rk slight variation on your big team... which would be similar to most open source on gitlab\hub = fork with feature branch in a git repository, where do your files live? https://jvns.ca/blog/2023/09/14/in-a-git-repository--where-do-your-files-live-/
Show previous comments
For a different angle, the Git Book also talks about some of these internals in its chapter on Git Objects. I recently leveraged that to manually update permissions in a Gerrit setup, which stores its user database in a unusual Git repository. @b0rk This is a thorough explanation of how git works! It's nice to learn a few things too. 12
|
@b0rk I recently implemented a db struct based on the sqlite article you referenced, and this is how it came out: https://gist.github.com/llimllib/2d03a8da46bbd3d247d2492849e3dc4e
I'd love to see how other people have implemented it!
@b0rk thanks, I'm using mux routing but my handlers can be a bit complex so this will help simplify them
@b0rk Hi Julia, I was curious to know how you built the categories thing in your blog page. Is the website open sourced, I'd like to have a peak and implement it in my own as well :p