Command Palette

Search for a command to run…

ZarynZaryn
Guides·5 min read

How do I…?

Short answers to the things people most often need to do. Find yours in the list on the right, or press / to search.

## Start ### Start version control in a folder I already have ```bash cd my-folder zev init zev add . zev commit -m "First version" ``` ### Get a project from Zaryn onto my computer ```bash zev clone owner/project ``` The repository page on Zaryn shows this command with the right address. ### Put my project on Zaryn ```bash zev login zaryn.xyz --register your-name --email you@example.com # once per computer zev new zev push ``` ## Save and look ### See what I changed ```bash zev status # which files zev diff # which lines ``` ### Save only some of my changes Stage just those files, then commit: ```bash zev add src/login.js src/login.css zev commit -m "Fix the login form" ``` Everything else stays changed but uncommitted. ### Check what I'm about to commit ```bash zev diff --staged ``` ### See the history of the project ```bash zev log --oneline ``` ### See what one commit changed ```bash zev show 47bec4f5 ``` ### Find who changed a line, and when ```bash zev blame path/to/file ``` Each line shows the commit and author that last changed it. Then `zev show <commit>` shows the whole change. ## Undo ### Throw away my changes to a file ```bash zev restore path/to/file ``` The file goes back to how it was in the last commit. Those edits are gone for good, so stash them first if you're not sure. ### Throw away all my uncommitted changes ```bash zev restore . ``` New files that were never added stay; delete them yourself if you don't want them. ### Unstage a file (I added it by mistake) ```bash zev restore --staged path/to/file ``` Your edits stay in the file; it just won't be in the next commit. ### Put my changes aside for a moment ```bash zev stash save "what I was doing" # ...do something else, switch branches, pull... zev stash pop ``` ### Bring back a file I deleted If it was in the last commit: ```bash zev restore path/to/file ``` ### Look at an old version of the project zev can't switch your folder to an old commit yet, but you can look at any commit without changing your files: ```bash zev show <commit> # what that commit changed zev diff <commit> HEAD -- file # how a file differs between then and now ``` ### Undo a commit I already made zev doesn't rewrite commits you've made. Make a new commit that undoes it: restore the files as you want them, then commit. `zev diff <commit>~1 <commit>` shows exactly what that commit changed, so you know what to undo. ## Files ### Delete a file ```bash zev rm path/to/file zev commit -m "Remove the old file" ``` Or delete it however you like, then `zev add path/to/file` (or `zev add .`) to stage the deletion. ### Rename or move a file Rename it normally, then stage both the old and the new name: ```bash mv old-name.txt new-name.txt zev add old-name.txt new-name.txt zev commit -m "Rename old-name to new-name" ``` `zev add .` stages both at once too. ### Stop tracking a file but keep it For example, a settings file with passwords that you committed by mistake: ```bash zev rm --cached .env echo ".env" >> .zevignore zev add .zevignore zev commit -m "Stop tracking .env" ``` If it held real secrets and you already pushed, change those secrets: they are still in the history. ### Ignore files (build output, logs, secrets) Create a `.zevignore` file in the top folder of the project, one pattern per line: ```text node_modules/ dist/ *.log .env ``` `zev status` and `zev add .` skip ignored files. Commit `.zevignore` so your teammates ignore the same files. `zev new` writes a sensible one for the main language you pick. ## Branches ### Work on something without touching main ```bash zev checkout -b my-feature ``` Commit as usual; `main` doesn't change until you merge. ### Switch branches when I have unfinished changes ```bash zev stash zev checkout other-branch # ...later... zev checkout my-feature zev stash pop ``` ### Bring my branch into main ```bash zev checkout main zev merge my-feature ``` ### Fix a merge conflict ```bash zev merge my-feature --resolve # edit the files it lists: keep what you want between <<<<<<< and >>>>>>>, delete the markers zev add . zev merge --continue ``` Full walk-through: [When both changed the same lines](/docs/en/branches#when-both-changed-the-same-lines). ### Mark a release ```bash zev tag v1.0 ``` ## Share and work together ### Get my teammates' latest changes ```bash zev pull ``` ### Send my commits ```bash zev push ``` ### Ask for a review before merging ```bash zev checkout -b fix-header zev commit -m "Fix the header on phones" zev push zev pr ``` ### Contribute to a project I can't push to ```bash zev fork-repo owner/project --clone cd project # ...commit your change... zev push zev pr ``` ### Report a bug or suggest an idea ```bash zev issue --title "Search ignores accents" --desc "Searching café doesn't find cafe" ``` Or open an issue on the repository's page on Zaryn. ### Send someone a file with a link Open **Storage** in the top menu, drop the file on **Upload a file**, then press **Copy link**. Anyone with the link can open it, so only share files that aren't private. More in [Storing and sharing files](/docs/en/storing-files). ### Delete a repository Open the repository and press **⚙ Settings** (for a topology repository, on its network overview). At the bottom, under **Danger zone**, type the repository's name and press **Delete this repository**. Its history, branches, pull requests, issues and every file stored for it are removed, and it can't be undone. Its owner can do this, and so can an owner or admin of its organization. ### See how much space I have left The bars at the top of **Storage** show repositories, files and packages against your plan. ## zev itself ### Update zev ```bash zev self update ``` If you installed it with apt, dnf, zypper or pacman, your system's normal update does it (`zev self update` tells you the command). ### Find a command I've forgotten ```bash zev help zev help stash ``` Or see [All commands](/docs/en/commands). ### Use zev on a server, in CI, or from an AI agent See [Scripting and AI agents](/docs/en/automation-and-agents).