D
D
DarkUser2016-07-02 16:03:38
git
DarkUser, 2016-07-02 16:03:38

How does git store changes?

from the git basics book: "Each time you commit the current version of a project, Git essentially saves a snapshot of what all the project's files look like at the current time."
so it just saves the version of the file to the current commit ? and svn stores only file changes? then I don’t understand why git works faster and takes up less space ....

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-07-02
Protko @Fesor

those it just saves the version of the file to the current commit ?

Not really. It looks like this, but in fact it also stores diffs, it’s just that these are not diffs between files, but between entire revisions (to simplify, commits), which reduces the required size of the repository and greatly simplifies working with them (due to which, in fact, everything pretty fast).
example with explanation

S
Stanislav Makarov, 2016-07-02
@Nipheris

Content-addressed data store ( en )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question