I know there are ways to backup my git repo to Google Drive using the desktop sync app, but I want to skip that step completely. Can I somehow set up Google Drive as a remote and push my commits straight there?
Has anyone tried this before? I’m looking for a way to store my code directly on Google Drive without needing the sync application running on my computer.
This won’t work - Google Drive doesn’t have git server infrastructure for remote operations. I spent months researching this exact setup last year for a personal project backup. Google Drive is just cloud storage, not a git host, so it can’t handle git’s network protocols for push/pull. The best workaround I found was creating a bare repo locally and letting Google Drive sync that folder. But you still need the desktop app running, which defeats your purpose. For reliable git hosting without local sync, GitHub or GitLab are still your best bet even though they’re not Google Drive.
Nope, Google Drive doesn’t support the git protocol, so you can’t set it up as a direct remote repository. I faced the same issue a few years back while looking for a backup option. Google Drive is more of a file storage service, lacking the necessary server-side capabilities for direct push or pull operations associated with git. For version control, you’re better off using GitHub, GitLab, or Bitbucket. If you really need to use Google Drive, consider syncing a bare repository using their desktop app, though that undermines your goal of avoiding the sync application.
nope, can’t be done. google drive doesn’t have the backend setup for git operations - it’s just not built for that. i’ve used git for years and your only real options are proper git hosts (github, gitlab) or that sync workaround you mentioned, which defeats the whole purpose. drive’s api doesn’t support git transfer protocols for push/pull commands.