🌘 再談版本控制
➤ 邁向更可靠的版本控制:從「手動重寫歷史」到結構化自動演進
✤ https://bramcohen.com/p/more-on-version-control
Bram Cohen 在本文中深入探討了他在版本控制系統領域的新構想。他指出,目前的 Git 雖然強大,但在「變基」(rebase)和「壓縮」(squash)操作時,往往會人為抹除歷史記錄,甚至產生錯誤風險。他提出了一種結合 CRDT(無衝突複製資料型別)與結構化錨定演算法的解決方案,透過在提交時鎖定差異(diffs),實現更安全且自動化的合併機制。這種方法能完整保留歷史脈絡,並將衝突處理視為時間軸上的更新同步,為開發者提供更直觀、可靠的版本控制體驗。
+ 很有啟發性。Git 的 rebase 確實經常讓人覺得是在「竄改歷史」,如果有一個系統能在保持自動化處理的同時,又具備嚴謹的歷史審計能力,那將是開發者的福音。
+ 對於「壓縮(squash)」操作的定義很有趣。目前多數系統確實把它當作刪除歷史的手段,但如果能像文中提到的那樣保留完整的演化過程,確實能減少
#軟體工程 #版本控制系統 #Git #CRDT
More on Version Control
https://bramcohen.com/p/more-on-version-control
#HackerNews #VersionControl #Git #Development #Coding #SoftwareEngineering
Nice git experience.
With A and B being logical streams of development I made a mess:
main -> A1 -> B1 -> A2 -> B2 -> B3
\-> A3
\-> B4 ... B10
I mixed A, B before noticing the need for 2 branches. I did:
- Switch to A3, rebase interactively to B1'...B3' A1'...A3'
- Switch to B3, rebase interactively and delete all the Ai in front
- Rebase B10 onto B3'.
I de-mixed two streams of development into their respective branches.😀
Watch it happen with gitk --reflog.
I wanted to try darcs and pijul vcs for quite sometime, but never had enough motivation, because it completely new ecosystems with different tooling.
Recently I learned about Jujutsu, which reuses fundamental ideas of darcs, but uses git as a storage backend, so I can use it with existing projects and tools.
https://www.jj-vcs.dev/latest/
I found a demo, and it is pretty neat and makes so much sense:
https://v5.chriskrycho.com/essays/jj-init/
https://youtu.be/cD9L3Mi1Vy4
https://youtu.be/2otjrTzRfVk
merging this... what could go wrong!

@stadtkind @edwtjo Well I really got into a spin. When doing the above where you
1. pull a new flake down into a directory with a new name /flake-new
2. rename the old /flake directory /flake-old
3. rename /flake-new as /flake
4. try nixos-rebuild switch --flake .#<machine_name>
caused the rebuild command to bug. It just kept giving me the old generation... full report here https://codeberg.org/adingbatponder/reticulum_nixos_flake/src/branch/main/docs/nixos-rebuild-switch-bug.md #nixos #rebuild #flake #git #generations (warning, AI Claude Code was used)
🌗 利用 Delta、fzf 與 Shell 腳本打造極致的 Git Diff 體驗
➤ 透過現代化 CLI 工具提升你的 Git 工作流效率
✤ https://nickjanetakis.com/blog/awesome-git-diffs-with-delta-fzf-and-a-little-shell-scripting
在程式開發過程中,高效地比對代碼差異是提升產能的關鍵。作者 Nick Janetakis 分享了他如何將 Git 與 Delta 和 fzf 深度整合。透過 Delta,開發者能獲得更直觀、具備雙色調的文字差異顯示;結合 fzf,他還撰寫了一個名為 `gd` 的自訂腳本,讓開發者能以互動式選單快速在不同檔案間切換,大幅簡化 PR 審查與版本比對的流程。這套配置不僅能無縫嵌入原有的 Git 指令,還能透過簡單設定,讓 `git diff`、`git show` 與 `git blame` 等指令瞬間升級。
+ 這篇文章真是及時雨!我一直覺得預設的 Git Diff 介面太難閱讀,Delta 的雙色調顯
#開發環境 #Linux #Git 工具 #生產力提升
David Duymelinck says: don't just git worktree. https://dev.to/xwero/dont-just-git-worktree-5o2 #git
📜 Latest Top Story on #HackerNews: I put all 8,642 Spanish laws in Git – every reform is a commit
🔍 Original Story: https://github.com/EnriqueLop/legalize-es
👤 Author: enriquelop
⭐ Score: 87
💬 Number of Comments: 14
🕒 Posted At: 2026-03-28 12:01:27 UTC
🔗 URL: https://news.ycombinator.com/item?id=47553798
#git #bot #hackernews #hackernewsbot #news
Any tips and tricks for using #git for #nix #nixos #flakes : when the "mother flake" flake lives on a public repo & is set up to provide multiple #configurations for different machines built using:
nixos-rebuild switch --flake .#<machine_name>
I dug myself into a hole by copying the files from the mother flake repo to set up a new machine and the flake on my new machine has diverged & cannot be merged back into the mother flake repo because I did not *clone* it down so has no common git history
Should I Switch From #Git to #Jujutsu
https://etodd.io/2025/10/02/should-i-switch-from-git-to-jujutsu/
Using git-send-email while being offline and with multiple email accounts [and msmtp]
https://ploum.net/2026-01-31-offline-git-send-email.html