mirror of
https://github.com/mike-rambil/Advanced-Git.git
synced 2026-01-06 09:29:30 -06:00
823 B
823 B
⬅️ Back to Git Command Reference (Full List)
git init --bare
Initialize a bare repository, typically used for remote repositories.
Command
git init --bare my-repo.git
Examples
- Create a bare repository for collaboration.
git init --bare my-repo.git
- Initialize a bare repo in a custom directory for server hosting.
git init --bare /srv/git/project.git
Steps
- Run
git init --bare my-repo.gitto create a bare repository.
➡️ See the Next Step: git clone --mirror
Author: mike-rambil • Updated: 2024-06-10 • Tags: init, bare, repository