Search the field guide

Search all 29 chapters. Your search stays on this device.

↑ ↓ Move between results Enter Open · Esc Close

Browse chapters

DocsAccounts & identityFIELD NOTES / 06

Accounts & identity · 1 min read

Choosing which account each repo uses

Preview documentation About this guide ⓘ

GitTrail is in preview: commands and features may change before the first release, and host integrations are still being tested against each live service.

Chapter 6 of 29
On this page

In this chapterChoose the rule that assigns the right account to a repo.

A rule connects the repo to your identity
Open a repo
Match a rule
Use its account
Most specific wins
  1. 1
    This repoAn explicit account for this project
    If none, continue ↓
  2. 2
    Remote ruleFor example, github.com/acme
    If none, continue ↓
  3. 3
    Folder ruleFor example, ~/code/work
    If none, continue ↓
  4. 4
    Default 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.

Need another approach?Find a fix →