mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
Pay more attention to when a Node ID is displayed in compact form. As this was sometimes used to save space, e.g. in `rad node status` in combination with long node addresses (like .onion names), also implement a compact format for node addresses and use that instead in some cases. Progress notifications in spinners keep the short form.
76 lines
3.6 KiB
Markdown
76 lines
3.6 KiB
Markdown
To create a local copy of a repository on the radicle network, we use the
|
|
`clone` command, followed by the identifier or *RID* of the repository:
|
|
|
|
```
|
|
$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed
|
|
✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
|
|
Fetching rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from the network, found [..] potential seed(s).
|
|
✓ Target met: [..] seed(s)
|
|
✓ Creating checkout in ./heartwood..
|
|
✓ Remote alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi added
|
|
✓ Remote-tracking branch alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi/master created for z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
|
|
✓ Repository successfully cloned under [..]/heartwood/
|
|
╭────────────────────────────────────╮
|
|
│ heartwood │
|
|
│ Radicle Heartwood Protocol & Stack │
|
|
│ 0 issues · 0 patches │
|
|
╰────────────────────────────────────╯
|
|
Run `cd ./heartwood` to go to the repository directory.
|
|
```
|
|
|
|
We can now have a look at the new working copy that was created from the cloned
|
|
repository:
|
|
|
|
```
|
|
$ cd heartwood
|
|
$ ls
|
|
README
|
|
$ cat README
|
|
Hello World!
|
|
$ git status
|
|
On branch master
|
|
Your branch is up to date with 'rad/master'.
|
|
|
|
nothing to commit, working tree clean
|
|
```
|
|
|
|
Let's check that the remote tracking branch was setup correctly:
|
|
|
|
```
|
|
$ git branch --remotes
|
|
alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi/master
|
|
rad/master
|
|
```
|
|
|
|
The first branch is ours, and the second points to the repository delegate.
|
|
We can also take a look at the remotes:
|
|
|
|
```
|
|
$ git remote -v
|
|
alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (fetch)
|
|
alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (push)
|
|
rad rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji (fetch)
|
|
rad rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk (push)
|
|
```
|
|
|
|
Let's check the last commit!
|
|
|
|
```
|
|
$ git log -n 1
|
|
commit f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354
|
|
Author: anonymous <anonymous@radicle.xyz>
|
|
Date: Mon Jan 1 14:39:16 2018 +0000
|
|
|
|
Second commit
|
|
```
|
|
|
|
Cloned repositories show up in `rad ls`:
|
|
```
|
|
$ rad ls --seeded
|
|
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
│ Name RID Visibility Head Description │
|
|
├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
│ heartwood rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji public f2de534 Radicle Heartwood Protocol & Stack │
|
|
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
```
|