Hacker News new | ask | show | jobs
by Cogito 4876 days ago
I'll admit that I don't know what your knowledge is, so my explanation might have been directed at the wrong level. I am drafting a pull request that rewrites this for you, hopefully that will be easier to understand!

I don't think that you need to understand all the plumbing, however it is important to understand how the index works, and that git stores the entire snapshot. The way it currently appears makes it seem like every time you switch branches git has to figure out the end state based on deltas, which is not true. Git has fast branch switching precisely because it stores the snapshot in its entirety.

[EDIT] Here is what I wrote if anyone is interested: http://gist.io/4969804

1 comments

Thanks for explaining this. Now I understand what the

    index 1ef56e5..2c756d0
in a diff refers to. I'm now poking around in the object store with `git cat-file -p <hash>` and it's very enlightening.