Skip to content

Commit 7a6eddb

Browse files
authored
host a git repo: change --bare to --mirror; rename (remove "style")
- plus some minor language fixes
1 parent a1059a1 commit 7a6eddb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Host a Git-style repo
2+
title: Host a Git repo
33
legacyUrl: https://docs.ipfs.io/guides/examples/git/
4-
description: Learn how to serve a static Git repository worldwide using IPFS, the InterPlanetary File System.
4+
description: Learn how to serve a static Git repository worldwide using IPFS
55
---
66

7-
# Host a Git-style repo
7+
# Host a Git repo
88

99
Have you ever said to yourself: "Man, my Git server isn't distributed enough" or "I wish I had an easy way to serve a static Git repository worldwide"? Well, wish no more.
1010

@@ -13,7 +13,7 @@ In this guide, we discuss how to serve a Git repository through the IPFS network
1313
To start, select a Git repository you want to host, and do a bare clone of it:
1414

1515
```bash
16-
git clone --bare git@myhost.io/myrepo
16+
git clone --mirror git@myhost.io/myrepo
1717
```
1818

1919
For those who aren't super Git-savvy, a bare repository means that it doesn't have a working tree, and can be used as a server. They have a slightly different format than your normal Git repository.
@@ -56,7 +56,7 @@ $ git clone http://QmX679gmfyaRkKMvPA4WGNWXj9PtpvKWGPgtXaF18etC95.ipfs.localhost
5656

5757
Note: make sure to change out that hash for yours.
5858

59-
Now, you may be asking "Well, what good is a Git repository that I can't change anything on?" Here's one use case. Say you program in Go. For those who don't know, Go uses version control paths for its imports, i.e:
59+
Now, you may be asking, "Well, what good is a Git repository that I can't change anything on?" Here's one use case. Say you program in Go. For those who don't know, Go uses version control paths for its imports, i.e:
6060

6161
```go
6262
import (
@@ -78,3 +78,4 @@ import (
7878
And you will be guaranteed to have the same code every time!
7979

8080
Note: Since Go doesn't allow the usage of localhost for import paths, we use the public HTTP gateways. This provides no security guarantees, as a man-in-the-middle attack could ship you bad code. You could use a domain name that redirects to the localhost instead to avoid the issue.
81+

0 commit comments

Comments
 (0)