What is a git “Snapshot”?

后端 未结 8 648
孤城傲影
孤城傲影 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:38

    Snapshot is to a repository as screenshot is to a video.

    It's the content (files and folders) of a repository at some point in time, a state of a repository, if you will.

    That content is represented by git's Tree Object and stored in the .git folder. When you commit, you store your repository's current working directory as a new repository's snapshot. Your Git repository consists of series of snapshots, other VCS consists of series of diffs instead.

提交回复
热议问题