73 lines
3.0 KiB
Plaintext
73 lines
3.0 KiB
Plaintext
# Example mgsh configuration. mgsh writes a blank ~/.mgshrc on first run; fill
|
|
# in the required settings (mgsh refuses to start until they are set). This file
|
|
# is just an annotated reference.
|
|
#
|
|
# Simple "key = value" (or "key: value") lines; a '#' after whitespace starts a
|
|
# comment. There are no built-in defaults. Settings are resolved in this order,
|
|
# each step overriding the one before:
|
|
#
|
|
# ~/.mgshrc -> <project>/.mgshrc -> MGSH_* environment variables
|
|
|
|
# --- required ---
|
|
base = /Users/me/src
|
|
githost = git.example.com
|
|
gitport = 22
|
|
gituser = git
|
|
gitpath = /home/git
|
|
|
|
# --- optional ---
|
|
# gitkey = mgit_rsa
|
|
# gitname = Your Name
|
|
# gitemail = you@example.com
|
|
# pushdefault = matching
|
|
|
|
# --- pushremote: mirror to public servers (gitea/github/gitlab) via their API ---
|
|
# One "remote.<name>.<field>" block per server, with the fields url, key, type
|
|
# and visibility. <name> is yours to pick and becomes the git remote created in
|
|
# the repository, so `git push gitlab` keeps working outside mgsh.
|
|
#
|
|
# `pushremote` pushes to every active server in the order given,
|
|
# `pushremote @gitlab` to a single one (active or not).
|
|
#
|
|
# `deleteremote @gitlab` (or `deleteremote gitlab.example.com`) deletes the
|
|
# project's repository there again, after asking. It always needs the server
|
|
# named, and the token needs permission to delete: delete_repo on GitHub,
|
|
# write:repository on Gitea, api + Owner on GitLab.
|
|
#
|
|
# remote.gitea.url = https://git.example.com
|
|
# remote.gitea.key = <personal-access-token>
|
|
# remote.gitea.type = gitea # optional; auto-detected from the url
|
|
# remote.gitea.visibility = private # or public (default private)
|
|
#
|
|
# remote.gitlab.url = https://gitlab.example.com
|
|
# remote.gitlab.key = <personal-access-token>
|
|
# remote.gitlab.type = gitlab
|
|
# remote.gitlab.visibility = public
|
|
# remote.gitlab.active = false # default true; false = only used when
|
|
# # named, e.g. `pushremote @gitlab`
|
|
#
|
|
# remotes = gitea, gitlab # optional: restrict and order the set
|
|
# mirror = true # `push` also mirrors via pushremote
|
|
|
|
# --- safety ---
|
|
# `push` checks the staged diff for private keys and API tokens before it
|
|
# commits, and asks before continuing. Only an explicit "off" disables it.
|
|
# secretscan = off
|
|
|
|
# --- per-project overrides ---
|
|
# A <project>/.mgshrc overrides all of the above for that project only, except
|
|
# base, gitname, gitemail and pushdefault, which stay global. Typical use:
|
|
#
|
|
# # ~/src/myproject/.mgshrc
|
|
# remotes = hub # this project is mirrored to github only
|
|
# mirror = true
|
|
#
|
|
# Keep tokens out of a project .mgshrc unless it is git-ignored — mgsh warns
|
|
# when it is not.
|
|
|
|
# Aliases live in the same file (managed by the `alias` command). The expansion
|
|
# is a mgsh command line; $1..$N and $*/$@ expand arguments, and a shell command
|
|
# needs a leading '!'.
|
|
alias co 'checkout $1'
|
|
alias ec '!echo $1'
|