The really cool thing about the .git folder is that it house the git repo’s entire history. One of the things this means is that you can disconnect your workstation from the internet, delete the project files. , but still recover them again because all the project files are stored in the “.git” folder (in compressed form), along with all it’s past history.

In other word’s the .git folder essentially acts as the project’s time machine. This means you can use git to roll back your project to how it looked like at some point in the past. E.g. roll back to commit number 2.