Skip to content

Commit 8bb4c0d

Browse files
committed
update getting started
1 parent 501c970 commit 8bb4c0d

File tree

4 files changed

+74
-30
lines changed

4 files changed

+74
-30
lines changed

README.md

+3-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Multiverse
22

33
[![Gitter](https://badges.gitter.im/multiverse-vcs/community.svg)](https://gitter.im/multiverse-vcs/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4-
[![Go Report Card](https://goreportcard.com/badge/github.com/multiverse-vcs/go-multiverse)](https://goreportcard.com/report/github.com/multiverse-vcs/go-multiverse)
54
[![codecov](https://codecov.io/gh/multiverse-vcs/go-multiverse/branch/master/graph/badge.svg?token=Y6UBYBD56P)](https://codecov.io/gh/multiverse-vcs/go-multiverse)
65

76
> A decentralized version control system for peer-to-peer software development.
@@ -10,13 +9,13 @@
109

1110
### Features
1211

13-
- ***Peer-to-peer*** - self host your repositories
14-
- ***Works offline*** - integrated local code viewer
12+
- ***Peer-to-Peer*** - self host your repositories
13+
- ***Works Offline*** - internet connection optional
1514
- ***Private & Secure*** - all communications are encrypted
1615

1716
### Getting Started
1817

19-
[Read the manual](https://www.multiverse-vcs.com/docs/).
18+
[Read the manual](docs/getting-started.md).
2019

2120
### Building
2221

@@ -28,25 +27,6 @@ $ cd go-multiverse
2827
$ make install
2928
```
3029

31-
### Usage
32-
33-
```
34-
USAGE:
35-
multi [global options] command [command options] [arguments...]
36-
37-
COMMANDS:
38-
branch List, create, or delete branches
39-
commit Record changes
40-
daemon Starts a client
41-
import Import a repo
42-
init Create a repo
43-
log Print repo history
44-
merge Merge commits
45-
status Print changes
46-
tag List, create, or delete tags
47-
help, h Shows a list of commands or help for one command
48-
```
49-
5030
### Contributing
5131

5232
Found a bug or have a feature request? [Open an issue](https://github.com/multiverse-vcs/go-multiverse/issues/new).

docs/getting-started.md

+66-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,73 @@ Multiverse uses peer-to-peer network protocols to exchange data.
44

55
Instead of using a centralized server, every participant runs a peer node.
66

7-
Running a peer node is simple and requires no extra setup.
7+
Start your peer node and keep it running in a separate terminal.
88

99
```bash
1010
$ multi daemon
1111
```
12+
13+
With the peer node up and running you are ready to create your first repository.
14+
15+
Create an empty directory and initialize the repository.
16+
17+
```bash
18+
$ mkdir my_project
19+
$ cd my_project
20+
$ multi init
21+
```
22+
23+
After you have made some changes check the repository status.
24+
25+
Notice that all files are tracked by default.
26+
27+
```bash
28+
$ multi status
29+
```
30+
31+
Once you are happy with your work, commit the changes to the repository.
32+
33+
A commit contains a snapshot of the files in your repository.
34+
35+
```bash
36+
# describe your changes with an optional message
37+
$ multi commit --message "add initial code"
38+
```
39+
40+
To share your code with others create a new repository on the peer node.
41+
42+
Ensure there is no confidential info. Everything shared on the main network is public.
43+
44+
```bash
45+
$ multi repo create my_project
46+
```
47+
48+
If the repository was created successfully its remote path will be printed.
49+
50+
```bash
51+
# your remote path will be different than this one
52+
12D3KooWFRfidCtkUkViUMTnoEoVtzDLmdCix8XUmVCoZcATLixG/my_project
53+
```
54+
55+
A remote path is how your repository is uniquely identified on the Multiverse network.
56+
57+
The remote path consists of your unique peer identifier followed by the repository name.
58+
59+
To push changes to the new remote repository, first add the remote to the repository.
60+
61+
```bash
62+
# replace the remote path with your unique remote path
63+
multi remote create origin 12D3KooWFRfidCtkUkViUMTnoEoVtzDLmdCix8XUmVCoZcATLixG/my_project
64+
```
65+
66+
Next set the branch remote to the one created above.
67+
68+
```bash
69+
multi branch set remote origin
70+
```
71+
72+
Finally push the changes.
73+
74+
```bash
75+
multi push
76+
```

pkg/command/repo/create.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package repo
22

33
import (
4+
"fmt"
5+
46
"github.com/multiverse-vcs/go-multiverse/pkg/rpc"
57
"github.com/multiverse-vcs/go-multiverse/pkg/rpc/repo"
68
"github.com/urfave/cli/v2"
@@ -30,6 +32,7 @@ func NewCreateCommand() *cli.Command {
3032
return err
3133
}
3234

35+
fmt.Println(reply.Remote)
3336
return nil
3437
},
3538
}

pkg/command/repo/list.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ func NewListCommand() *cli.Command {
2626
return err
2727
}
2828

29-
fmt.Println("")
30-
fmt.Printf("Name%28sCID\n", "")
31-
fmt.Printf("----%28s---\n", "")
32-
33-
for name, id := range reply.Author.Repositories {
34-
fmt.Printf("%-32s%s\n", name, id.String())
29+
for name := range reply.Author.Repositories {
30+
fmt.Printf("%s/%s\n", reply.PeerID.Pretty(), name)
3531
}
3632

3733
return nil

0 commit comments

Comments
 (0)