You should never synchronize git or any other dvcs repository using any such synchronization tools.
This includes git, mercurial, fossil, bazaar, etc.
For synchronization tools this includes Dropbox, Google Drive, OneDrive, Jottacloud, etc.
Why?
Because these tools doesn't consider the repository as a unit, they consider the individual files inside on a file-by-file basis.
Here's an example of how you can easily mess up your repositories:
- On one computer you commit a new changeset
- You then move over to another computer
- Before or while this has completely synchronized your changes you start doing commits or other operations
- Then the synchronization kicks in and in some cases will get conflicts
How conflicts are handled varies but for some of them an extra file is created with a "-conflict" filename. Git or any other of the tools won't look at this conflicting file. If both files was renamed you have now corrupted your repository.
The biggest source of problems this kind of situation could create is when modifications done on separate computers are mixed. Conflict files would be created but depending on the order of things you might have 4 files that have changed on one computer and then the same 4 files changed on another, however due to the synchronization, ordering, and conflicts, you end up with 2 of them from the first computer and the other 2 from the other computer. The unity of these modifications belonging together has been lost.
Note that conflicts here should not arise in the git objects as these should be uniquely named (SHA1) and only be added, but any of the housekeeping files that keep track of branch pointers and such will easily get into a conflict.
This kind of corruption might be fixable after the fact but it might be difficult and a lot of work and would most likely involve a good working knowledge of the Git internal datastructures.
Exactly why you experienced the thing you experienced, and why those files were deleted is next to impossible to answer.
However, there is a very easy fix for this whole thing.
Stop using Google Drive to synchronize your repository and sign up for a free bitbucket account instead. Push your repository to a private project/repository up in the cloud and simply use normal push/pull operations between your computers.