Sign in

Principle of recovering files with git or SVN

Varun edited in Sat, 01 Aug 2020

After deleting a file locally, it can be restored immediately through version management tools. I think to realize this function, you need to copy at least one copy of the source file to record incremental changes. But in fact. GIT and. SVN directories are not particularly large. Why?

5 Replies
commented on Sat, 01 Aug 2020

Record the modification and save the latest version

commented on Sat, 01 Aug 2020

It's just a place to record changes, not backup files

commented on Sat, 01 Aug 2020

Svgit and. Svgit are not only local records, but also online records.

commented on Sun, 02 Aug 2020

Git is not an incremental backup, it does archive every file. You don't think it's particularly big because the code file is not big, even if all files are copied completely, that is, x2. In actual projects, it's impossible for every file to be modified.

commented on Sun, 02 Aug 2020

Git will encrypt and compress the content of the file into the. Git folder, and then get the specified content through SHA1 value when it needs to be recovered. For details, you can refer to my node.js Several functions of GIT: gito

lock This question has been locked and the reply function has been disabled.