What is a git “Snapshot”?

后端 未结 8 649
孤城傲影
孤城傲影 2020-12-04 12:01

The official Git doc says:

$ git diff test

This will show you what is different between your current working directory and the snapsh

8条回答
  •  醉酒成梦
    2020-12-04 12:30

    My understanding is that a snapshot in general is just the "entity" that git uses to store its data. As opposed to storing its data as a series of "deltas" / changesets like SVN does, for example, each commit that you do to git creates a "commit object" that references a snapshot of what the code looked like at that point in time.

    So as @Femaref says, it is the state of the code at a specific time and does not necessarily mean it is the head of the test branch but could be in the example you saw.

提交回复
热议问题