Washi

Git and sync

Keep your notes in a Git repository and the same notes appear on every computer and phone, with the whole history kept.

Washi has no cloud of its own. To have the same notes everywhere, keep them in a Git repository, for example a private one on GitHub, GitLab or your own server. On iPhone and iPad, iCloud Drive is the other choice.

On the computer#

What you need#

Washi runs the git command that is installed on the computer, so your own Git settings, SSH keys and saved passwords apply.

SystemInstall Git
macOSRun xcode-select --install in Terminal, or brew install git
WindowsInstall Git for Windows
Linuxsudo apt install git, sudo dnf install git or your distribution's package

Set up a repository#

If your notes are already in a repository, skip to step 3.

  1. Create an empty private repository, for example on GitHub: New repository, name it notes, choose Private.
  2. Clone it in a terminal:
    git clone https://github.com/you/notes.git ~/Notes
  3. In Washi, File → Open Folder (⇧⌘OCtrl+Shift+O) and pick the folder.

The bottom of the sidebar's Files tab now shows the Git panel: the branch, the number of changed files, a box for the commit message and four buttons.

Notes that aren't in a repository yet can be turned into one with git init in their folder, then git remote add origin <address>.

The Git panel#

ButtonWhat it doesThe same as
CommitSaves every change in the folder to the history.git add -A and git commit
PullBrings in commits from the server, keeping your uncommitted changes.git pull --rebase --autostash
PushSends your commits to the server.git push
SyncCommit, then Pull, then Push, stopping at the first problem.all three
  • The commit message is optional. Without one, Washi writes one from the file names, such as “Update notes: Plan.md and Ideas.md”.
  • ↩Enter in the message box commits.
  • Without a remote, Sync only commits.
  • A branch that has never been pushed goes to origin (or the only remote) and is set to track it, as git push -u origin <branch> would.

Most of the time Sync is the only button you need: write, press Sync, and the other computer gets the notes on its next Sync.

File letters in the sidebar#

LetterMeaning
MModified since the last commit
AAdded to the next commit
UNew, not yet in Git
RRenamed
DDeleted
!In conflict

A folder with changes inside is marked too.

Conflicts#

When the same lines changed on two computers, Pull or Sync stops and says so, for example “Rebase stopped on conflicts (files: 1). Fix them, then Continue.” The files in conflict are marked !.

  1. Open each marked note. Git has put both versions in it, between marker lines:
    <<<<<<< HEAD
    The text from the server
    =======
    Your text
    >>>>>>> Your commit
  2. Edit the note to keep what you want, delete the marker lines, and save.
  3. Press Continue.

Abort gives up instead and puts everything back as it was before the Pull.

Signing in#

If Washi says “Git couldn't sign in to the remote”, Git on this computer has no access to the repository yet. Set it up once in a terminal; Washi uses the same sign-in afterwards. Any of these works:

  • GitHub CLI: gh auth login, then gh auth setup-git.
  • SSH: make a key with ssh-keygen -t ed25519, add the public key to your account (on GitHub: Settings → SSH and GPG keys), and clone with the git@github.com:you/notes.git address.
  • A credential manager: Git for Windows and the Mac's Keychain remember the password or token after the first git pull in a terminal.

On iPhone, iPad and Android#

The mobile apps don't need Git installed: sync is built in.

Sign in with GitHub#

  1. Open Settings → Keep Notes → Git Repository.
  2. Tap Sign In with GitHub, then Copy Code and Open GitHub.
  3. Paste the code on the GitHub page and allow access. Washi waits and carries on by itself.
  4. Pick a repository for notes, or tap New Repository to make one; it can be private.

Washi clones the repository into a folder on the device and keeps your notes there.

Any other Git server#

Choose Other Server or Set Up Manually, and fill in:

  • Address: https://…/notes.git or git@…:you/notes.git.
  • Branch: leave empty for the repository's default.
  • For an HTTPS address, User Name and an Access Token: a personal access token with read and write access to the repository. The token is kept in the Keychain on iPhone and iPad, and encrypted on Android.
  • For an SSH address, an SSH Key: tap Create Key, then Copy Public Key, and add it to the server. On GitHub that is Settings → SSH and GPG keys, or the repository's deploy keys with write access. Or tap Paste Private Key to use a key you already have, with its passphrase if it has one.
  • Author Name and Author Email for your commits.

Then tap Clone and Use.

How mobile sync works#

  • With Sync Automatically on, Washi syncs when it opens and after you leave a note.
  • The Sync button in Settings syncs at any time.
  • Sync commits your changes, brings in the server's, and sends yours.
  • It never stops on a conflict. When a note changed on both sides, your version stays and the server's is saved beside it as Plan (conflict 3f2a9c1).md. Compare the two, keep what you want, and delete the copy.
  • If a server's SSH key is not the one it had before, Washi refuses to connect and says so, to protect you from a fake server.

Without Git#

  • iCloud Drive (iPhone, iPad and the Mac): on iOS, choose Settings → Keep Notes → iCloud Drive. On the Mac, open the iCloud Drive folder in Washi with File → Open Folder.
  • Any synced folder: Dropbox, OneDrive, Google Drive or Syncthing folders work like any other folder on the computer. Open them with File → Open Folder.