How to Host aPrivate Git Remote on Dropbox (Step-by-Step Guide With Code Examples)
Developers often want a simple, free, private Git remote that works across devices without relying on GitHub or GitLab.
A great option is to use Dropbox as your own Git remote, by creating a bare Git repository inside your Dropbox folder.
This guide shows:
- how to create the Dropbox remote,
- how to push from your local machine,
- how to clone it elsewhere,
- how to fix “empty clone” issues,
- and how to safely work with Dropbox + Git.
All with practical Windows + Git Bash examples.
Why Use Dropbox as a Git Remote?
- 100% free (just uses your Dropbox storage)
- Works offline—Dropbox syncs later
- Simple to set up
- Good for private projects, WordPress plugins, prototypes, etc.
⚠️ Not recommended for large teams or high-frequency commits. But perfect for solo developers.
1. Create a Bare Git Repository Inside Dropbox
A bare repository is what Git remotes use (it has no working files—only the repo data).
Choose where inside Dropbox you want to store your remotes:
C:\Users\<you>\Dropbox\git-remotes\
Git Bash commands
# Go to your Dropbox directory
cd "/c/Users/<you>/Dropbox"
# Create a folder for your custom remotes
mkdir -p git-remotes
cd git-remotes
# Create a bare repository
mkdir my-project.git
cd my-project.git
git init --bare
Your new remote is now located at:
C:\Users\<you>\Dropbox\git-remotes\my-project.git
(Replace <you> with your real Windows username.)
2. Connect Your Local Project to the Dropbox Remote
CASE A — Your project already uses Git
cd "/c/Users/<you>/code/my-project"
# Add Dropbox as your origin
git remote add origin "/c/Users/<you>/Dropbox/git-remotes/my-project.git"
# or update it if origin already exists
git remote set-url origin "/c/Users/<you>/Dropbox/git-remotes/my-project.git"
# Check your branch name
git branch
# Push for the first time (if your branch is 'main')
git push -u origin main
# Or if it's 'master':
# git push -u origin master
CASE B — Your project does NOT use Git yet
cd "/c/Users/<you>/code/my-project"
git init
git add .
git commit -m "Initial commit"
# Connect to Dropbox remote
git remote add origin "/c/Users/<you>/Dropbox/git-remotes/my-project.git"
# Push the initial code
git push -u origin main # or master
3. Using PowerShell or CMD Instead of Git Bash
Paths must use Windows format:
cd C:\Users\<you>\code\my-project
git remote add origin "C:\Users\<you>\Dropbox\git-remotes\my-project.git"
git push -u origin main
Use quotes if your Windows username has spaces.
4. Clone the Dropbox Remote on Another Machine
After Dropbox syncs the .git folder:
cd "/c/Users/<you>/code"
git clone "/c/Users/<you>/Dropbox/git-remotes/my-project.git"
Now you can push/pull normally:
git pull
git push
5. Important Warnings (Dropbox + Git)
Dropbox is not a Git server. It simply syncs files.
So follow these rules:
DO:
- Wait for Dropbox to fully sync before pushing from another computer.
- Commit/push normally from one machine at a time.
DO NOT:
- Push simultaneously from two machines.
- Allow Dropbox to create conflicted copies inside the
.gitfolder.
(If that happens, stop immediately.)
6. How to View the Dropbox Remote as Normal Files
You cannot browse a bare repo like a normal folder.
Instead, clone it somewhere else:
cd /c/somewhere/else
git clone "D:/Dropbox/git-remote-personal/chat-plugin.git" chat-plugin-from-dropbox
cd chat-plugin-from-dropbox
This gives you a readable working copy.
7. Fix: “Clone shows only the .git folder” (empty clone)
If your clone contains ONLY a .git folder, your bare repository probably points to the wrong branch—usually master instead of main.
Fix inside the bare repo:
cd /d/Dropbox/git-remote-personal/chat-plugin.git
# Check what HEAD points to
cat HEAD
# Example wrong output:
# ref: refs/heads/master
# Fix by pointing HEAD to the right branch:
git symbolic-ref HEAD refs/heads/main
After this, cloning or pulling will work correctly.