Manual for Pijul

#37 [Feature]: How do I get back to the state in a remote repository?

Opened by hu on April 10, 2021
hu on April 10, 2021

It still is rather unclear to me how I can throw away all my unpublished work and get back to the state as seen in some remote.

Basically something similar to:

git reset --hard some_remote/main
git clean -fdx

The “nuke my changes from orbit” option of version control;-)

andrepuel on October 13, 2021

If you run

pijul reset

You will remove all local modifications. But you are still not like the remote state. I think the easiest way is to create a new empty channel and pull remote changes into it:

pijul channel new tmp
pijul channel switch tmp # In case "main" was the current channel
pijul channel delete main
pijul pull login@ssh.pijul.com:pijul/manual --from-channel main --to-channel main
pijul channel switch main
pijul channel delete tmp