git 或 svn 恢复文件原理
仅有的幸福
仅有的幸福 2017-05-02 09:41:37
0
4
713

本地删掉一个文件之后,可以通过版本管理工具马上恢复。
我觉得要实现这个功能,需要至少将源文件拷贝一份,记录增量修改。
但是实际上发现 .git 和 .svn 目录并没有特别大,为什么?

仅有的幸福
仅有的幸福

reply all(4)
伊谢尔伦

Record modifications and save the latest version

给我你的怀抱

It’s just a place to record changes, not a backup file

过去多啦不再A梦

Git and svn are just a kind of version controller. .git or .svn only records your operation records. If you delete the file locally, it will not be deleted online, so it can still be restored.

为情所困

Git is not an incremental backup, but actually archives every file. You think it's not particularly big because the code files are not big in the first place. Even if all the files are copied completely, it is just x2. However, in actual projects, it is impossible for every file to be modified.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template