Add another Git host without starting over.
Already using GitHub? Add GitLab or your company's Git server without changing what already works.
GitHub 已经配好了?直接添加 GitLab 或公司 Git 服务,不用重新折腾现有配置。GitHub · GitLab · Any Git Host
Different platforms. Different identities.不同平台,用不同身份。
Set up each Git identity once. sshift handles SSH keys and commit author settings for matching repositories, so you can keep using Git as usual. 配置一次身份,sshift 就会为匹配的仓库使用对应的 SSH key、提交姓名和邮箱。之后照常使用 Git。
Install sshift
macOS & Linux · Git 2.36+ · 中文文档
Already using GitHub? Add GitLab or your company's Git server without changing what already works.
GitHub 已经配好了?直接添加 GitLab 或公司 Git 服务,不用重新折腾现有配置。Personal projects use your personal email. Work repositories use your work email. No need to switch Git configs before every commit.
个人项目用私人邮箱,公司项目用工作邮箱。不用每次提交前手动切换 Git 配置。Each Git host gets its own SSH key. Need multiple accounts on the same platform? Use separate SSH aliases.
不同 Git 平台使用各自的 SSH key。同一个平台有多个账号,也可以通过 SSH 别名区分。Start with sshift add. Add your public key to the Git platform, and you're ready to go.先运行 sshift add,把公钥添加到对应的 Git 平台,就可以正常使用了。
sshift addsshift add --edit <name>Edit an existing identity using the same wizard.修改已有身份,还是同一个向导。
sshift doctorsshift doctor --fixFix configuration issues or migrate existing repository-level author settings.修复配置问题,或迁移旧仓库中单独设置的提交身份。
sshift listsshift rm <name>Existing repositories with local author overrides may need a one-time sshift doctor --fix.如果旧仓库单独设置过提交姓名或邮箱,可能需要运行一次 sshift doctor --fix。