Could a deletion of a file inside the .git folder affect the files outside this folder?
No, git won't touch the working directory files unless you tell it to.
Could the deletion undo some changes in the repository files?
Yes. If you delete a reference in .git/refs you will lose that branch or tag, but the commit it points to will still be there and you can recover its location with git reflog
.
If you delete a hook in .git/hooks that hook is gone.
If you delete an object file that could be the content of a file, directory, or commit. This would leave you with a corrupted history. git fsck
will check the integrity of your repository. If you have a remote repository, you should be able to use it to replace the missing object.
If you delete .git/index you will lose your staged changes. You can re-add them.
See the Git Internals chapter of the Git Book for more detail.