News for hackers. Stuff that matters.
Re:Some Git internals by Waterluvian on Friday December 25, 2020 @04:34PM (#25539221)
This was really really educational. Git internals seem rather simple.

Does anyone have a really good visual explanation of what's being done to the tree and such when commits and merges and rebases are done? I still don't quite grok it intimately enough.

Re:Some Git internals by divbzero on Friday December 25, 2020 @05:00PM (#25539370)
The Git Internals section of the Pro Git book covers commits [1] and branches [2] well though it doesn’t go into details about merges and rebases.

[1]: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects

[2]: https://git-scm.com/book/en/v2/Git-Internals-Git-References

Re:Some Git internals by edrobap on Saturday December 26, 2020 @12:34AM (#25541655)
Branching is more of an art. With the kind of flexibility git provides, one can get lost in the convention to follow. I have found this useful For a small team working on app development -

https://nvie.com/posts/a-successful-git-branching-model/

Re:Some Git internals by aequitas on Friday December 25, 2020 @05:26PM (#25539522)
Ungit[0] shows what will happen to the tree before you execute a merge or rebase. It really helped me get a hang of Git.

[0] https://github.com/FredrikNoren/ungit

Re:Some Git internals by sransara on Friday December 25, 2020 @10:22PM (#25541111)
I wrote my self a note about this last year to demystify the internal data structure [0], if you want to check it out. But the TLDR straight to rabbit holes; is that commits are a directed acyclic graph (DAG) [1]. And the file tree snapshot is a fully persistent trie [2]. And the commit DAG points to different snapshots. Branches are name shortcuts to commits.

[0] https://sransara.com/notes/2019/build-yourself-a-git/ [1] https://en.wikipedia.org/wiki/Directed_acyclic_graph [2] https://en.wikipedia.org/wiki/Persistent_data_structure

Re:Some Git internals by rustybolt on Friday December 25, 2020 @04:57PM (#25539352)
learngitbranching.js.org is quite good