J
John Wiegley
jwiegley.github.io · Personal blog · on HN since 2015
John Wiegley hosts "Git from the Bottom Up," a short guide to Git's internal data structures and how its commands work.
What HN saysHN commenters repeatedly recommend it as the piece that made Git click for them, praising it as short, clear, and good at demystifying commands.
35HN people shared it
24linked it in comments
11stories submitted
269story points
9 months agolast shared
2015people per year2026
Most-shared posts
- 1Git from the Bottom Up (2008)34 people · 269 points · first shared 2015 · 28 comments on HN
- 2Keywords1 people · first shared 2022
What HN people wrote when they linked it
darkryder · 2026-01-27
Great writeup! It's always fun to learn the details of the tools we use daily.
For others, I highly recommend Git from the Bottom Up[1]. It is a very well-written piece on internal data structures and does a great job of demystifying the opaque git commands that most beginners blindly follow. Best thing you'll learn in 20ish minutes.
1. https://jwiegley.github.io/git-from-the-bottom-up/
llmblockchain · 2024-03-09
Here's a great walk through for how Git works from the bottom up: https://jwiegley.github.io/git-from-the-bottom-up/
It's short, easy to understand and you'll understand HEAD.
brasetvik · 2022-08-06
It's not a single digit minute read, but to me "Git from the Bottom Up" was what really made me understand git a long time ago.
https://jwiegley.github.io/git-from-the-bottom-up/
git's the kind of tool where understanding how your commands operate on the underlying data structures will probably make it a lot easier to use efficiently. (And they're beautifully simple despite how powerful and flexible they are)
As a tool you might be using for hours per week for a few more decades, it's worth the investment going beyond the "in x minutes". I tend to provide both to juniors.
Obligatory: https://xkcd.com/1597/
yogeshg · 2022-07-20
["Git from the Bottom Up"](https://jwiegley.github.io/git-from-the-bottom-up/) changed my life. Someone recommended this to me, and I recommend this to anyone seeking more information about git. People often just want to know "which commands to run", which is a fair expectation, until they reach a threshold of what they can do without knowing the internals.
[When should someone read "Git from the Bottom Up"? What are your git recommendations?](https://forms.gle/aqFy52uvTp8CUvkF9)
kevsim · 2020-11-01
This is cool!
For anyone wishing to learn why git is the way it is, I always recommend reading Git From the Bottom Up [0]. I don't consider myself a git guru, but I found this to be a really great read to understand the underlying concepts.
0: https://jwiegley.github.io/git-from-the-bottom-up/
juancn · 2020-06-28
Git is not really that complex, it is conceptually really simple. Most of the issues at the beginning have to do with an incorrect mental model of how it works.
It's almost impossible to lose something you committed in git by screwing up (due to reflogs).
I would recommend studying "Git from the bottom up" which for me was the way to finally grasp it: http://jwiegley.github.io/git-from-the-bottom-up/
cpach · 2019-04-25
Getting acquainted with git could be a suitable task for him. Acquiring that skill should pay of well for him. These two links might be a good start: http://gitimmersion.com/ and https://jwiegley.github.io/git-from-the-bottom-up/
Best of luck!
dakra · 2019-03-14
I recommend "Git from the bottom up"[1] for a nice and relatively simple tutorial that shows you the inner design of a git repository.
[1] https://jwiegley.github.io/git-from-the-bottom-up/
svat · 2019-01-16
My recommendations:
* Git From the Bottom Up: https://jwiegley.github.io/git-from-the-bottom-up/ (PDF: http://ftp.newartisans.com/pub/git.from.bottom.up.pdf) (See also: "Linus Torvalds' greatest invention": http://perl.plover.com/yak/git/) Once your mental model matches the program, you'll be able to understand everything, hack your own solutions if necessary, etc.
* Learn Git Branching: https://learngitbranching.js.org -- in fact I think this should be the UI for Git; wish someone would make that happen (i.e., so that you can point it to any Git repo and get that sort of visualization for it).
AceJohnny2 · 2016-10-27
See also "Git from the Bottom Up" https://jwiegley.github.io/git-from-the-bottom-up/
I read lots of tutorials on Git when I started with it just a few years ago, and that's the one that best helped me grok it.
tcoff91 · 2023-09-14
You should read this: https://jwiegley.github.io/git-from-the-bottom-up/
capableweb · 2023-01-22
You won't have to put your entire life on break in order to understand the fundamentals of git and why it works the way it works. Going through https://jwiegley.github.io/git-from-the-bottom-up/ and really understanding the material will take you a couple of hours at max, but will save you a lot of time in the future.
Wanting to understand things before using them is hardly elitism, not sure why you would think that.
Just like you probably don't want to fix bugs without understand the cause, it's hard to use a tool correctly unless you know how the tool works.
AndrewDucker · 2022-11-18
Git from the bottom up. A very clear and simple guide to the internals.
https://jwiegley.github.io/git-from-the-bottom-up/
pjerem · 2022-11-14
Git From The Bottom Up : https://jwiegley.github.io/git-from-the-bottom-up/
bvrmn · 2022-07-05
Do/did you use other VCSes? I did. ClearCase, CVS, SVN, Mercurial. It's a real horror (excluding later) to deal with. Sometimes basic operations like merge need separate role (human) to perform.
Mercurial is nice if you are a max middle-level and do not use anything besides checkout/commit/push. Any non-trivial stuff requires manual reading (the same as for git)
I know you have no time to know your tool. But I don't see any hurdles to allocate one evening and read https://jwiegley.github.io/git-from-the-bottom-up/.
It gives a model that you can apply to other distributed VCS and may be make you a better engineer.
armitron · 2022-07-03
Full of errors, I think John Wiegley’s “Git from the bottom up” is much better.
https://jwiegley.github.io/git-from-the-bottom-up/
microSnowball · 2022-06-29
The author mentions the 30-odd page Git From the Bottom Up in his talk and I think it's a solid starting point--
https://jwiegley.github.io/git-from-the-bottom-up/
faho · 2022-05-16
> except that use-package, by itself, does not install anything.
It can be configured to install things (by using the builtin package.el): https://jwiegley.github.io/use-package/keywords/#ensure-pin
> You can use use-package to load packages from ELPA with package.el. This is particularly useful if you share your .emacs among several machines; the relevant packages are downloaded automatically once declared in your .emacs. The :ensure keyword causes the package(s) to be installed automatically if not already present on your system (set (setq use-package-always-ensure t) if you wish this behavior to be global for all packages)
So if all you need is package.el (and there's a good chance that's the case), you can just
(setq use-package-always-ensure t)
and your configuration will now install the packages if you copy it to a new system.
weaksauce · 2021-04-05
many people have done it but here's another one https://jwiegley.github.io/git-from-the-bottom-up/
berkes · 2020-07-17
The git-cli is an inconsistent mess, agreed.
The data-model, however, is not. It is actually a very smart, mathematical (cryptographical) tree-structure[1].
I'm pretty sure some far future generation will be able to figure out the math behind a "git database". I'm actually more confident they will be able to do so, than your average "excel" or "winrar backup".
--
[1] I really started liking git and understanding what it all is about (and how to use the weird commandline --flags - or was is -flags or -f or -F or flags) after reading the Git From the Bottom Up book: https://jwiegley.github.io/git-from-the-bottom-up/
callahad · 2020-06-28
If you decide to give Git one more shot, you might enjoy John Wiegley's Git from the Bottom Up (https://jwiegley.github.io/git-from-the-bottom-up/). It didn't teach me how to use Git, but it did teach me how Git works, and that was key to solidifying my own knowledge.
As others have mentioned, the version control space has been effectively monopolized by Git. Mercurial offers roughly the same data model with a better interface, but you're still fighting an uphill battle with limited tooling support, etc. Fossil is notable for being the SCM used to develop SQLite, but again, it's relatively unknown outside of that space.
jrbancel · 2016-02-21
The most enlightening introduction to git internal model (graph of commits) and how the main commands alter it I have read so far: https://jwiegley.github.io/git-from-the-bottom-up/
I think it is slightly more relevant to understand the model than the .git/ structure since the .git/ folder is just an implementation detail.
jonahx · 2015-09-10
Web version: http://jwiegley.github.io/git-from-the-bottom-up/
A nice resource in the same vein -- build a bare bones git in javascript: http://kushagragour.in/blog/2014/01/build-git-learn-git/
And finally, Linus's one page explanation of git's central concepts for the initial commit of git: https://github.com/git/git/tree/e83c5163316f89bfbde7d9ab23ca2e25604af2…