Let's look at how patch updates work. Alice creates a project and Bob clones it. ``` ~alice $ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public Initializing public radicle ๐Ÿ‘พ project in . โœ“ Project heartwood created. Your project's Repository ID (RID) is rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK. You can show it any time by running `rad .` from this directory. โœ“ Project successfully announced. Your project has been announced to the network and is now discoverable by peers. To push changes, run `git push`. ``` ``` ~bob $ rad clone rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK โœ“ Tracking relationship established for rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK with scope 'all' โœ“ Fetching rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK from z6MknSLโ€ฆStBU8Vi.. โœ“ Forking under z6Mkt67โ€ฆv4N1tRk.. โœ“ Creating checkout in ./heartwood.. โœ“ Remote alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi added โœ“ Remote-tracking branch alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi/master created for z6MknSLโ€ฆStBU8Vi โœ“ Repository successfully cloned under [..]/heartwood/ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ heartwood โ”‚ โ”‚ radicle heartwood protocol & stack โ”‚ โ”‚ 0 issues ยท 0 patches โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ Run `cd ./heartwood` to go to the project directory. ``` We wait for Alice to sync our fork. ``` ~bob $ rad node events -n 1 --timeout 1 {"type":"refsSynced","remote":"z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi","rid":"rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK"} ``` Bob then opens a patch. ``` ~bob (stderr) $ cd heartwood $ git checkout -b bob/feature -q $ git commit --allow-empty -m "Bob's commit #1" -q $ git push rad -o sync -o patch.message="Bob's patch" HEAD:refs/patches โœ“ Patch a84ea2e8626a86442910a2e70837561538c20efb opened โœ“ Synced with 1 node(s) To rad://zhbMU4DUXrzB8xT6qAJh6yZ7bFMK/z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk * [new reference] HEAD -> refs/patches ``` ``` ~bob $ git status --short --branch ## bob/feature...rad/patches/a84ea2e8626a86442910a2e70837561538c20efb ``` Alice checks it out. ``` ~alice $ rad patch checkout a84ea2e โœ“ Switched to branch patch/a84ea2e โœ“ Branch patch/a84ea2e setup to track rad/patches/a84ea2e8626a86442910a2e70837561538c20efb $ git show commit bdcdb30b3c0f513620dd0f1c24ff8f4f71de956b Author: radicle Date: Thu Dec 15 17:28:04 2022 +0000 Bob's commit #1 ``` Bob then updates the patch. ``` ~bob (stderr) $ git commit --allow-empty -m "Bob's commit #2" -q $ git push rad -o sync -o patch.message="Updated." โœ“ Patch a84ea2e updated to 9fd6bb156bc899aef7119e6d97c6cf850639a7df โœ“ Synced with 1 node(s) To rad://zhbMU4DUXrzB8xT6qAJh6yZ7bFMK/z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk bdcdb30..cad2666 bob/feature -> patches/a84ea2e8626a86442910a2e70837561538c20efb ``` Alice pulls the update. ``` ~alice $ rad patch show a84ea2e โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ Title Bob's patch โ”‚ โ”‚ Patch a84ea2e8626a86442910a2e70837561538c20efb โ”‚ โ”‚ Author bob z6Mkt67โ€ฆv4N1tRk โ”‚ โ”‚ Head cad2666a8a2250e4dee175ed5044be2c251ff08b โ”‚ โ”‚ Commits ahead 2, behind 0 โ”‚ โ”‚ Status open โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ cad2666 Bob's commit #2 โ”‚ โ”‚ bdcdb30 Bob's commit #1 โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ— opened by bob z6Mkt67โ€ฆv4N1tRk now โ”‚ โ”‚ โ†‘ updated to 9fd6bb156bc899aef7119e6d97c6cf850639a7df (cad2666) now โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ $ git ls-remote rad f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/heads/master cad2666a8a2250e4dee175ed5044be2c251ff08b refs/heads/patches/a84ea2e8626a86442910a2e70837561538c20efb ``` ``` ~alice $ git fetch rad $ git status --short --branch ## patch/a84ea2e...rad/patches/a84ea2e8626a86442910a2e70837561538c20efb [behind 1] ``` ``` ~alice $ git pull Updating bdcdb30..cad2666 Fast-forward ``` ``` ~alice $ git show commit cad2666a8a2250e4dee175ed5044be2c251ff08b Author: radicle Date: Thu Dec 15 17:28:04 2022 +0000 Bob's commit #2 ```