Dev Collection
HomeGitHubAI Web
  • ReadMe
  • How to use patch-package
  • Add GCC for node-canvas in Centos7.x
  • Create Server-Sent Events in Nextjs
  • TimeZone in Jest
  • Common Git Commit Message Types
  • Node v8 memory leak
  • minIO + picGO self-hosted image hosting service
  • Preventing SSH remote brute-force attacks
  • Ubuntu安装Netflix-Proxy
  • SNIProxy+Dnsmasq实现Netflix-Proxy
  • Simultaneously Pushing a Repository to Two Different Remotes: GitHub and GitLab
  • Typescript中的类型谓词
  • Mac Sonoma 无法安装 Charles 的解决办法
  • Git 多账号管理:在不同文件夹区分Git账号
  • localStorage VS IndexedDB
  • Chrome Extension 开发指南
Powered by GitBook
On this page

Git 多账号管理:在不同文件夹区分Git账号

处理在同一台电脑下,对不同的仓库使用不同的github账号或者gitlab账号

打开gitconfig文件

vi ~/.gitconfig

添加如下内容:

[includeIf "gitdir:**/github/**"]
path = ~/.githubconfig

新建一个 githubconfig文件

vi ~/.githubconfig

githubconfig内容添加:

[user]
	name = another_name
	email = another_name@github.com

这样以后只要是 github 目录下的仓库,都会走 githubconfig下的账号,可以区分公司账号以及个人账号。

PreviousMac Sonoma 无法安装 Charles 的解决办法NextlocalStorage VS IndexedDB

Last updated 1 year ago