Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

The recommended way to configure spr is to run spr init, rather than setting config values manually. You can rerun spr init to update config at any time.

spr uses the following Git configuration values:

config keyCLI flagdescriptiondefault1default in spr init2
githubAuthToken--github-auth-token3The GitHub authentication token to use for accessing the GitHub API.
githubRepository--github-repositoryName of repository on github.com in owner/repo format
githubMasterBranchThe name of the centrally shared branch into which the pull requests are mergedmastertaken from repository configuration on GitHub
branchPrefix--branch-prefixString used to prefix autogenerated names of pull request branchesspr/GITHUB_USERNAME/
requireApprovalIf true, spr land will refuse to land a pull request that is not acceptedfalse
requireTestPlanIf true, spr diff will refuse to process a commit without a test plantrue
  • The config keys are all in the spr section; for example, spr.githubAuthToken.

  • Values passed on the command line take precedence over values set in Git configuration.

  • Values are read from Git configuration as if by git config --get, and thus follow its order of precedence in reading from local and global config files. See the git-config docs for dteails.

  • spr init writes configured values into .git/config in the local repo. (It must be run inside a Git repo.)


  1. Value used by spr if not set in configuration.

  2. Value suggested by spr init if not previously configured.

  3. Be careful using this: your auth token will be in your shell history.