https://blog.gitbutler.com/how-git-core-devs-configure-git/
AI 摘要 (By Moe Copy):本文分享了 Git 核心开发者常用的配置设置,并探讨了这些设置为何应成为默认值。文章分为三部分:明显改进 Git 的配置(如分支排序、标签排序、默认分支、差异算法等)、无害且可能有用的配置(如自动纠正提示、提交时显示差异等),以及个人偏好的配置(如合并冲突样式、拉取默认行为等)。作者通过实际示例和配置代码,详细解释了每个设置的作用和优势。
TLDR
• 提供了一组 Git 配置代码,可直接复制到 ~/.gitconfig 文件中,涵盖分支、标签、差异、推送、拉取等优化设置。
How do Git core devs configure their Gits?
• 介绍了 Git 核心开发者通过邮件列表讨论的“春季大扫除”实验,参与者分享了他们认为应成为默认的 9 项配置和 3 个别名。
• 这些配置包括 merge.conflictstyle、rebase.autosquash、diff.algorithm 等。
Clearly Makes Git Better
1. Listing branches
• 使用 branch.sort = -committerdate 按提交日期排序分支,column.ui = auto 以列格式显示分支。
2. Listing tags
• 使用 tag.sort = version:refname 按版本号排序标签,避免字母顺序的问题。
3. Default branch
• 设置 init.defaultBranch = main 避免每次初始化仓库时的警告。
4. Better diff
• 使用 diff.algorithm = histogram 改进差异算法,diff.colorMoved = plain 高亮移动的代码。
5. Better pushing
• 设置 push.autoSetupRemote = true 自动设置上游分支,push.followTags = true 自动推送标签。
6. Better fetching
• 使用 fetch.prune = true 和 fetch.pruneTags = true 自动清理已删除的远程分支和标签。
Why the Hell Not?
1. Autocorrect prompting
• 设置 help.autocorrect = prompt 在输入错误命令时提供纠正建议。
2. Commit with diffs
• 使用 commit.verbose = true 在提交消息编辑器中显示完整差异。
3. Reuse recorded resolutions
• 启用 rerere.enabled = true 和 rerere.autoupdate = true 自动重用冲突解决方案。
4. Global ignore file
• 设置 core.excludesfile = ~/.gitignore 使用全局忽略文件。
5. Slightly nicer rebase
• 使用 rebase.autoSquash = true 和 rebase.autoStash = true 优化变基操作。
A Matter of Taste
1. Better merge conflicts
• 使用 merge.conflictstyle = zdiff3 在冲突标记中显示原始内容。
2. Better pulling
• 设置 pull.rebase = true 将拉取默认行为设为变基而非合并。
3. Run the fsmonitor processes
• 启用 core.fsmonitor = true 和 core.untrackedCache = true 加速大仓库的状态检查。
Butler's Log
How Core Git Developers Configure Git
What `git config` settings should be defaults by now? Here are some settings that even the core developers change.
我再信别人吹的 coloros 比 hyperos 好我就是傻逼。
一加 pad 2 pro 到手几天,这 8e coloros 系统流畅的不如 8+ 的小米平板。碰瓷 ipad pro 更是做梦。
我还在想,系统再烂能烂到哪去,结果到手感觉还不如用原生。
等有空详细盘一下(
一加 pad 2 pro 到手几天,这 8e coloros 系统流畅的不如 8+ 的小米平板。碰瓷 ipad pro 更是做梦。
我还在想,系统再烂能烂到哪去,结果到手感觉还不如用原生。
等有空详细盘一下(
😁6
Fast Allocations in Ruby 3.5
https://railsatscale.com/2025-05-21-fast-allocations-in-ruby-3-5/
https://news.ycombinator.com/item?id=44062160
Ruby 3.5 中的快速对象分配
Ruby 3.5 通过优化对象分配,显著提升了性能,尤其是在使用 YJIT 时,速度提升可达 6.5 倍。
Key Takeaways
- Ruby 3.5 的对象分配速度比 Ruby 3.4.2 快 1.8 倍(无 YJIT)和 2.3 倍(有 YJIT)。
- 关键字参数越多,速度提升越明显,使用 YJIT 时速度提升可达 6.5 倍。
- 通过内联 Class#new 方法,消除了参数复制和栈帧开销。
- 优化减少了对象分配次数,尤其是关键字参数传递时的哈希分配。
- 该优化导致 Class#new 调用栈帧的缺失,可能影响调试信息。
https://railsatscale.com/2025-05-21-fast-allocations-in-ruby-3-5/
https://news.ycombinator.com/item?id=44062160
Ruby 3.5 中的快速对象分配
Ruby 3.5 通过优化对象分配,显著提升了性能,尤其是在使用 YJIT 时,速度提升可达 6.5 倍。
Key Takeaways
- Ruby 3.5 的对象分配速度比 Ruby 3.4.2 快 1.8 倍(无 YJIT)和 2.3 倍(有 YJIT)。
- 关键字参数越多,速度提升越明显,使用 YJIT 时速度提升可达 6.5 倍。
- 通过内联 Class#new 方法,消除了参数复制和栈帧开销。
- 优化减少了对象分配次数,尤其是关键字参数传递时的哈希分配。
- 该优化导致 Class#new 调用栈帧的缺失,可能影响调试信息。
Rails at Scale
Fast Allocations in Ruby 3.5
Many Ruby applications allocate objects. What if we could make allocating objects six times faster? We can! Read on to learn more!
Akasha Terminal: dev🍃
https://blog.gitbutler.com/how-git-core-devs-configure-git/ AI 摘要 (By Moe Copy):本文分享了 Git 核心开发者常用的配置设置,并探讨了这些设置为何应成为默认值。文章分为三部分:明显改进 Git 的配置(如分支排序、标签排序、默认分支、差异算法等)、无害且可能有用的配置(如自动纠正提示、提交时显示差异等),以及个人偏好的配置(如合并冲突样式、拉取默认行为等)。作者通过实际示例和配置代码,详细解释了每个设置的作用和优势。 TLDR…
发一下我用得上的
有争议的:
git config --global init.defaultBranch main # 默认主分支命名为 main
git config --global tag.sort version:refname # 让 1.100 排在 1.99 后面
git config --global push.autoSetupRemote true # 自动发布远程新分支
git config --global push.followTags true # 自动推送本地 tags 到 remote
git config --global help.autocorrect prompt # 自动纠错并询问,prompt 改成 10 是自动等待 10 * 100ms 后执行,详见 https://blog.gitbutler.com/why-is-git-autocorrect-too-fast-for-formula-one-drivers/
有争议的:
# 自动删除远程删除的分支, Tags (e.g. origin/delete-branch)
git config --global fetch.prune true
git config --global fetch.pruneTags true
git config --global fetch.all true
# 拉取冲突默认 rebase
git config --global pull.rebase true
🥰3
群友锐评 Harmony Desktop:
拼好 OS
用的 Musl C,有 dt (里面有大量私有组件,有 ubsan 和 tsan 和 hwasan,分别来自 LLVM (Linux 内核也在用) 谷歌 和 安卓,终端是 Alacritty, 窗口 ID 是 window76_xcomponent0 (感觉像是给每个窗口分配了个 XServer,类似 XWayland, 用户没有 chown chmod 权限
😁5
推特是真草台班子,登录接口挂了 40h 了
https://downdetector.com/status/twitter/
https://downdetector.com/status/twitter/
😁3
Forwarded from HAT's Public Channel |
不是你 DNSPod 又是在哪里拉的 Excel 表???
https://docs.dnspod.cn/dns/dns-record-line/#%E7%9C%81%E4%BB%BD%E4%BA%91%E5%8E%82%E5%95%86
https://docs.dnspod.cn/dns/dns-record-line/#%E7%9C%81%E4%BB%BD%E4%BA%91%E5%8E%82%E5%95%86
Forwarded from 🍋小T
【我的悲伤是火做的-哔哩哔哩】 https://www.bilibili.com/video/BV1n7jnzJEWG?p=1&unique_k=2333
Bilibili
我的悲伤是火做的_哔哩哔哩_bilibili
原作:chilichill BV1Qc411h7Ys填词:@peinko PV:@北岷有籽-其岷白人 @peinko 特别鸣谢:@猫桃桃momoka 调教软件:XStudio某天半夜被热醒灵感爆发记下歌词(话说真的不是脑子被热坏了吗)新手第一次接触XS,能动已经是奇迹了(感谢桃桃老师悉心指导)感谢北岷帮忙制作PPT(划掉)PV, 视频播放量 255781、弹幕量 428、点赞数 44927、投硬币枚数 5918、收藏人数 10810、转发人数 5007, 视频作者 peinko, 作者简介 …
Akasha Terminal: dev🍃
转转上门抢劫,mbp 也没卖掉,添点钱全款买了新的( 在这里同出一个 M1 Pro 的 MBP,银色,16+1T,10 核 CPU+16 核 GPU,美版,Apple Intelligence 已经可用 成色自定义 9 成新: A 面有个非常小的凹坑(剪刀不小心砸到了),ACD 面有一些正常使用的细小划痕,键盘祖传打油(售后可以免费换,过保也行),电池健康 98% 左右 转转报价 6k,闲鱼均价 7.5k,群友优惠按均价立减 -500 某人看我换了之后自己也想换,所以后面可能还会出个 MBP14(…
美版银色 16 寸 M1 Pro 16 + 1T,10 cpus + 16 gpus,成色如图,电池健康98%,apple intelligence已可用,群友按均价刀500到5500
再刀100到5400
已出,感谢你们
🌚2