Getting started with Porjay
This guide takes you from nothing to sharing code, then covers daily work. Commands are the same on Linux and macOS.
1. Install
$ curl -fsSL https://porjay.labmirai.org/install.sh | sh
See Install Porjay for manual downloads and building from source.
2. Create an account and a repository
Sign up with a username, email and password, then open the link we email you. Next, use New repository. Your project lives at https://porjay.labmirai.org/you/project.
3. Clone and commit
Cloning copies the whole project, history included, and opens a working folder. Put your username in the address so Porjay can push for you; it asks for your password once and can remember it.
$ porjay clone https://[email protected]/you/project $ cd project $ porjay user default you $ porjay add notes.md $ porjay commit -m "First notes"
porjay user default makes your check-ins show your Porjay username. Commits sync to the server automatically while you’re online (this is called autosync). Offline, keep committing and run porjay push later.
4. Daily work
porjay statusshows what changed;porjay diffshows how.porjay add FILEtracks new files;porjay addremoveadds every new file and forgets deleted ones.porjay commit -m "Message"saves all changes to tracked files. There is no staging step.porjay updatepulls others’ work and updates your folder.porjay timelinelists recent check-ins.porjay revert FILEthrows away local edits;porjay undoreverses the last update, merge or revert.
5. Branches and merging
$ porjay commit --branch idea -m "Try a new layout" $ porjay update trunk $ porjay merge idea $ porjay commit -m "Merge idea"
The main branch is called trunk. porjay branch list shows all branches.
6. The web interface
Every repository has a web interface with its timeline, files, wiki, tickets and forum. Open https://porjay.labmirai.org/user/project in your browser, or run a private copy on your own computer:
$ porjay ui
7. Sharing and collaborators
- Public repositories can be browsed and cloned by anyone. Only people you add can push.
- To add a collaborator, open your repository, log in with your Porjay username and password, then go to Admin, then Users, and add them with the Developer role.
- Private repositories ask everyone to log in before showing anything.
- If you reset your Porjay password, your repositories switch to the new one. On each computer, run
porjay remote scruband thenporjay sync, enter the new password, and answer y to remember it.
8. Coming from git
| git | porjay | What it does |
|---|---|---|
git init | porjay init NAME.porjay | Create a new repository file, then open it. |
git clone URL | porjay clone URL | Copy a repository and open a working folder. |
git add FILE | porjay add FILE | Start tracking a file. There is no staging step. |
git commit -am MSG | porjay commit -m MSG | Save every changed tracked file as a new stage. |
git push | porjay push | Send your stages to the server (commit does this automatically). |
git pull | porjay update | Pull new stages and bring your folder up to date. |
git status | porjay status | See what changed in your folder. |
git log | porjay timeline | List recent check-ins, newest first. |
git diff | porjay diff | Show line-by-line changes. |
git switch -c NAME | porjay commit --branch NAME | Start a branch with your next commit. |
git switch NAME | porjay update NAME | Move your folder to another branch. |
git stash | porjay stash | Set changes aside and get them back later. |
git restore FILE | porjay revert FILE | Throw away local edits to a file. |
git rm / git mv | porjay rm / mv | Remove or rename tracked files. |
git tag NAME | porjay tag add NAME current | Name a check-in. |
(none) | porjay ui | Open the full web interface for your repository locally. |
To convert a git project with its history:
$ git fast-export --all | porjay import --git project.porjay
9. Getting help
Run porjay help for all commands, or porjay help commit for one. Porjay is built on Fossil, so Fossil’s documentation applies too: read fossil as porjay.