Skip to content

Want to use 2 or more github accounts? Try it in Windows sandbox directly! | 想在一台电脑使用多个Github账户?AnotherGit能一键在Windows沙盒中启用另一用户。

License

Notifications You must be signed in to change notification settings

LetMeFly666/AnotherGit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

AnotherGit

Want to use 2 or more github accounts? Try it in Windows sandbox directly! | 想在一台电脑使用多个Github账户?AnotherGit能一键在Windows沙盒中启用另一用户。

前言

这也许是一个很小众的需求:在一台(Windows)电脑上,使用不同的Github账号,进行commit并push到Github上。

可以写脚本进行切换,操作完再切回来(后面可能写写);也可以直接写个“脚本”,双击配置文件打开Windows自带的沙盒,开箱即用,沙盒中直接配置好了第二个Github账号的身份。

使用方法

  1. 在Windows上启用Windows Sandbox(参考链接
  2. 将本仓库下载到本地,并修改Codes/main.wsb中的配置。包括:本仓库下载到的位置(第4行)、你宿主机上Git安装的位置(第9行)
  3. 修改Codes/ToCopy/.gitconfig中你的Github邮箱和用户名
  4. Codes/ToCopy/.ssh下的id_rsaid_rsa.pub替换为具有Github操作权限的ssh key(参考链接
  5. 双击Codes/main.wsb(选择“通过沙盒打开”)
  6. 在沙盒中进行地使用Git吧!身份已经切换为了新配置的Github用户,git也被添加到了环境变量中

About

Want to use 2 or more github accounts? Try it in Windows sandbox directly! | 想在一台电脑使用多个Github账户?AnotherGit能一键在Windows沙盒中启用另一用户。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published