In this chapterChoose the rule that assigns the right account to a repo.
- 1This repoAn explicit account for this projectIf none, continue ↓
- 2Remote ruleFor example, github.com/acmeIf none, continue ↓
- 3Folder ruleFor example, ~/code/workIf none, continue ↓
- 4Default accountWhen no other rule matches
GitTrail never copies settings into your repos. It links each repo to an account’s settings, so editing an account updates every repo at once.
Four levels, most specific wins
| Level | Use it when | Where |
|---|---|---|
| This repo | One project is different | Repositories › account picker · gittrail use <account> |
| Remote rule | All repos from an organisation, wherever they’re cloned | Folder rules › By remote address · gittrail auto <account> --remote github.com/acme |
| Folder rule | Everything under a folder (~/code/work) |
Folder rules page · gittrail auto <account> <folder> |
| Default account | Everything else | Sidebar · gittrail use <account> --global |
Each repo shows where its account comes from: Set for this repo, From
a folder rule or From your default account. gittrail current shows
the same in a terminal.
💡 Suggested folder rules: if all repos in a folder belong to one account, GitTrail offers a one-click rule.
The right SSH key, every time: GitTrail tells Git exactly which key to
use for each account (core.sshCommand with IdentitiesOnly=yes), so
your SSH agent can’t offer the wrong key. No ~/.ssh/config aliases
needed.
Account chips show which account a repo, pull request or commit belongs to, everywhere in the app.
Check the result
Run gittrail current in the repo. Confirm both the selected account and the matching rule.
Next step: Use Doctor to check the identity and SSH connection.