A zero-dependency local Git server powered by Python and
git-http-backend, featuring a responsive, GitHub-styled dashboard for managing and creating repositories locally.
Most self-hosted Git solutions (like Gitea, GitLab, or full-blown server setups) are heavy, require external databases, or take too much configuration to run locally.
LocalGit solves this by acting as a lightweight, single-folder hub. It uses your system's native git utility via a Python Bottle CGI gateway, giving you a clean, GitHub-like web interface right on your machine (http://localhost:8080). It's perfect for offline development, testing hooks, or managing local scratchpads without internet dependency.
Ensure you have the following installed and added to your system's PATH:
- Python (3.x)
- Git
Create a folder on your drive named C:\localgit.
Since LocalGit is designed to be self-contained without needing global pip install commands, you can make it completely portable:
- Download the single-file micro-framework from bottlepy.org/bottle.py.
- Save it directly as
bottle.pyinside yourC:\localgit\folder.
(Alternatively, you can install it globally via terminal: pip install bottle)
Your C:\localgit\ folder should look like this:
C:\localgit\
│
├── bottle.py # Bottle micro-framework (or installed via pip)
├── index.html # GitHub-styled web dashboard
└── localgit-server.py # Python server & git-http-backend gateway
- Open your terminal or Command Prompt inside
C:\localgit - Run the server script:
python localgit-server.py- The server will boot up on http://localhost:8080 open your default web browser to the LocalGit dashboard.
- Type any keyword into the top input field ("Find a repository or type name for a new one...").
- The repository list below will filter dynamically in real-time as you type.
- Type your desired repository name into the same top input field (e.g., my-cool-project).
- Click the New repository button.
- The server will initialize a bare repository instantly in the background, display a success notification, and add the repository card to your dashboard without reloading the page.
Each repository card on your dashboard includes a pre-formatted HTTP URL and a Copy button. To link an existing local project on your machine to your LocalGit server and push it, open Git Bash inside your project folder and run:
# 1. Initialize git if not already done
git init
# 2. Add all your files and commit
git add .
git commit -m "Initial commit"
# 3. Link to your LocalGit server (replace 'my-cool-project.git' with your repo name)
git remote add origin http://localhost:8080/my-cool-project.git
# 4. Push your code (this will automatically sync and push to your local server)
git push -u origin master