Docs/Desktop/Power Features/Git Identity

Git Identity

Switch between GitHub accounts and keep the git author name and email on your commits attributed to the right one.

If you have ever committed to a work repository as your personal account, this is the button for you. Git Identity shows which GitHub account you are acting as and which name and email your commits will carry, and lets you change both.

Opening the Panel

Click the account icon in the app header. The tooltip tells you the state before you click: GitHub -- <login>, GitHub -- not signed in, or GitHub CLI not installed.

The panel is headed Git Identity and has three rows:

  • account -- the GitHub account currently active in the gh CLI.
  • user.name -- the git author name that commits will use.
  • user.email -- the git author email that commits will use.

Any row that has no value reads Not set. The name and email are read for the folder you have selected, merging the repository's own config over your global one, which is exactly what git itself would do. With no folder selected you will see a * No folder selected note, and the values shown are your global ones.

Switching Accounts

Logged-in GitHub accounts are listed below the rows, with a checkmark on the active one. Click a different account to switch to it.

Lanes then offers to update the commit identity to match, prefilled from that account's GitHub profile. This is the point of the feature: switching account without switching author identity is how commits end up attributed to the wrong person, so the prompt follows the switch rather than waiting for you to remember. The same prompt appears after signing in.

Other actions in the panel:

  • Sign in and Add another account authenticate a new account. Lanes hands its own GitHub authorization to the gh CLI, so there is no second login flow to complete.
  • Sign out removes one specific account and leaves the others alone.
  • Clone repository lists your repositories and clones one straight into a Lanes project as the active account.

Setting the Commit Identity

The dialog is titled Commit identity or Global git identity, depending on what it is about to write, and takes a Name and an Email. Leave a field empty and that value is left untouched.

The scope rule is the thing to understand:

  • Repository-local when the folder you have selected is a git repository. Lanes writes the repository's own config, so the change affects that project and nothing else.
  • Global when it is not. Lanes writes your global config, which is what repositories without their own identity fall back to.

The dialog title tells you which of the two is about to happen, and a toast confirms it afterwards.

Where the Identity Shows Up

The active identity is rendered read-only at the foot of the Changes pane, so you can see who is about to be credited while you are writing the commit message rather than finding out afterwards. The commit and pull-request dialogs read the same value.

Requirements and Limits

  • Account switching needs the GitHub CLI. Lanes reads and switches accounts through gh. If it is missing, the panel tells you to install it with brew install gh. Setting the name and email works without it.
  • Identities come from your GitHub accounts, or from what you type. Lanes does not keep a separate list of named identity profiles.
  • Scope is repository-local or global. There is no per-worktree identity, so a worktree inherits the identity of the repository it belongs to.
  • SSH keys are not managed. Lanes changes who git says you are, not how you authenticate to a remote.