diff options
Diffstat (limited to 'content/en/hardenedpass/using/sync')
| -rw-r--r-- | content/en/hardenedpass/using/sync/index.md | 61 | ||||
| -rw-r--r-- | content/en/hardenedpass/using/sync/menu.png | bin | 0 -> 97032 bytes |
2 files changed, 57 insertions, 4 deletions
diff --git a/content/en/hardenedpass/using/sync/index.md b/content/en/hardenedpass/using/sync/index.md index 271c72c..2351d5b 100644 --- a/content/en/hardenedpass/using/sync/index.md +++ b/content/en/hardenedpass/using/sync/index.md @@ -1,13 +1,66 @@ +++ title = "Sync" date = 2026-11-05T00:00:00Z -description = "" +description = "How HardenedPass syncs your store with git: when changes are committed, how to pull and push, and how to recover from a conflict." weight = 70 draft = true +++ -Placeholder. +Every change you make in the app, such as a new entry, an edit or a delete, is +committed to git on the phone straight away. **Nothing is sent to the server until you +sync.** Until then, the change exists only on this phone. -## First heading +## Sync -Text. +Pull down on the list to synchronize. You can also use the three dots in the search +bar: + +{{< image src="menu.png" alt="The list's menu with Synchronize repository, Pull from remote, Push to remote and Settings." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +- **Synchronize repository** fetches the server's changes and sends yours. +- **Pull from remote** only fetches. +- **Push to remote** only sends. + +Synchronize is what you want almost every time. To turn the gesture off, use +**Disable pull to sync action** in +[Settings]({{< relref "/hardenedpass/reference/settings" >}}). + +## When two devices change the same thing + +If you edit the same entry on the phone and on a computer before syncing, git cannot +pick a winner. The app uses a rebase by default (**Rebase on pull**), and the sync +stops with an error saying the pull failed and that you are in a detached head. Your +work is not lost. + +Open **Settings**, then **Local Git config & utilities**. You have two ways out: + +### Keep your changes + +**Abort rebase and push new branch** cancels the rebase and sends your local work to a +new branch on the server. The app tells you its name. Then, on a computer: + +```bash +pass git fetch origin +pass git merge origin/BRANCH-NAME +``` + +Git stops on the entries that conflict. Encrypted files cannot be merged line by line, +so keep one version of each, finish the merge, and send it back with `pass git push`. +On the phone, finish with the hard reset below, so that the phone matches the server +again. + +### Throw your changes away + +**Hard reset to remote branch** asks for the branch name, then makes the phone an exact +copy of it. + +{{< callout type="warning" >}} +A hard reset discards local commits and changes that are not on that remote branch. Use +it only when you are sure, or after saving your work with the option above. +{{< /callout >}} + +## Other tools + +The same screen sets the name and email used for commits, shows the commit log with +**Show commit log**, and offers **Run garbage collection job** to tidy up the local +repository. diff --git a/content/en/hardenedpass/using/sync/menu.png b/content/en/hardenedpass/using/sync/menu.png Binary files differnew file mode 100644 index 0000000..a03da57 --- /dev/null +++ b/content/en/hardenedpass/using/sync/menu.png |
