Föderation EN Mo 10.06.2024 15:21:59 now that the Git zine is done, I've been thinking about ways to celebrate! Thinking of writing a few quick "bonus" pages about topics that we couldn't fit in the zine, maybe about more obscure git features what would you be interested in? (git bisect? git worktree? something else?) https://wizardzines.com/zines/git/ Medien: 1 |
Föderation EN Mo 10.06.2024 15:23:40 @b0rk Hooks? Packing/gc? Remotes? |
Föderation EN Mo 10.06.2024 15:25:25 @b0rk I'd definitely put in a vote for `git bisect` -- it is a really profound tool and IME one of the bits that junior engineers are least likely to have in their toolboxes. It's also one of the big reasons people use rebase workflow. |
Föderation EN Mo 10.06.2024 15:25:43 @b0rk sure would! |
Föderation EN Mo 10.06.2024 15:27:26 @b0rk A git "best of failures" ? |
Föderation EN Mo 10.06.2024 15:27:30 @b0rk Definitely git bisect. |
Föderation EN Mo 10.06.2024 15:29:53 @b0rk another vote for bisect, it feels like something I should know and use but I haven't touched it at all |
Föderation EN Mo 10.06.2024 15:29:58 @b0rk bisect as a concept is a tool that has been very useful to me over the years, but not so much "git bisect". It seems that almost every large software project invents some way to bisect over nightly builds for example (Chromium and Firefox both have tools for this)... I think a zine about bisection might be cool. |
Föderation EN Mo 10.06.2024 15:33:50 @bsmedberg @b0rk I strongly agree; "bisect" as both a tool and a problem-solving approach is one of those ideas that bootstraps itself from "technical skill" to "life skill" very quickly, and learning how to use the tool, and the approach (and when you shouldn't!) has been valuable to me in more ways than I can count. |
Föderation EN Mo 10.06.2024 15:30:07 @b0rk git worktree please π |
Föderation EN Mo 10.06.2024 15:37:07 @b0rk I was thinking on a bit more guidance around resolving merge conflicts. The page describes the format, but doesn't give precise instruction how to edit the file (which lines need to go, which should stay etc.) and which git commands to call next. |
Föderation EN Mo 10.06.2024 15:51:32 @b0rk I would be curious about details of the protocol between my machine and remotes. Lets say I would like to implement a Heroku-like server on my own. How would I do that? What is already there? What do I have to implement? I started several times to look into this, but always got lost because it is hard to get an overview and a starting point. At least it was for me. |
Föderation EN Mo 10.06.2024 16:31:16 @achim Did you have a look into https://dokku.com/ and similar implementations to learn from? There are also many other examples on https://github.com/topics/paas The most recently updated ones are: - https://caprover.com/ They are all open source, so you should be able to reverse engineer their git protocol handling. |
Föderation EN Mo 10.06.2024 17:02:49 @yala That's a great starting point. Thanks a lot! |
Föderation EN Mo 10.06.2024 15:52:12 @b0rk the magic of `git maintenance start` |
Föderation EN Mo 10.06.2024 15:57:53 @AlexAxthelm what's that? I've never heard of it |
Föderation EN Mo 10.06.2024 20:20:49 @b0rk @AlexAxthelm it's a pretty new feature. It adds a list of repos into ~/.gitconfig, then when you run `git maintenance` it loops over each repo and runs the tasks configured in the .git/config of each one. The most interesting tasks are gc and fetching from upstream into hidden refs so that subsequent manual fetches stay fast. It can also add maintenance calls into user systemd timers, or a user crontab, or the macOS scheduler thingy |
Föderation EN Mo 10.06.2024 22:37:18 @b0rk itβs a relatively new command (~2021 I think) that sets up a few automated processes to keep a repo feeling snappy, like prefetching (so git fetch runs instantly), rebuilding the graph, and garbage collection. Most notable on big repos, but makes git operations crazy fast on pretty much any repo. |
Föderation EN Mo 10.06.2024 15:53:08 @b0rk One more vote for git bisect, please. And maybe merge strategies: -X ours/theirs -s ours and how to use git commit-tree -p to do a -s theirs. |
Föderation EN Mo 10.06.2024 16:03:51 @b0rk are git submodules covered in the zine? |
Föderation EN Mo 10.06.2024 16:46:11 @nichtich they're not, that's a good idea |
Föderation EN Mo 10.06.2024 17:39:41 @b0rk me, each time I have a use case for git submodules: yeah, this might be good fit in theory but a pain in practice because I don't fully understand how to use them |
Föderation EN Mo 10.06.2024 19:27:15 |
Föderation EN Mo 10.06.2024 17:02:53 @b0rk worktrees are an underused feature that I find very useful. |
Föderation EN Mo 10.06.2024 18:00:47 @b0rk To be selfish, would love a blurb on git patch, but git worktree would be great too! (selfish because as amazing as git bisect is, I feel like I got that topic locked down haha). |
Föderation EN Mo 10.06.2024 18:17:01 @b0rk rebase interactive is a neat one, that and git add --patch |
Föderation EN Mo 10.06.2024 18:50:49 @b0rk Worktrees and submodules are two things that come to mind. Maybe commit signing too? |
Föderation EN Mo 10.06.2024 19:20:36 @b0rk perhaps the cool things that can go into your git configuration, like includeIf and alias |
Föderation EN Mo 10.06.2024 20:16:20 @b0rk git-maintenance(1)!!! |
Föderation EN Mo 10.06.2024 21:04:21 @b0rk Worktrees would be a good choice: They're underused IMHO because they are a relatively recent addition (2015) and their great boon is not obvious. They're great for ephemeral work because afterwards you can nuke them without concern. The alternative is a short-lived separate clone, but if you're like me you'll want to carefully check for unrelated work in accumulated branches/stashes/etc before deleting it (see https://news.ycombinator.com/item?id=30400869). Cognitively this makes a big difference IMHO. |
Föderation EN Mo 10.06.2024 21:39:00 |
Föderation EN Mo 10.06.2024 21:22:30 @b0rk Ran into git submodules again for the first time in years and was reminded how weird they are and how easy it is to get things borked up. Looked in your zine first π, but no joy π, so went to the official docs π€ͺ |
Föderation FR Mo 10.06.2024 23:45:24 @b0rk cherry picking! |
Föderation EN Di 11.06.2024 03:46:41 @b0rk git bisect and/or worktree sounds great! |
Föderation EN Di 11.06.2024 23:50:17 @b0rk |