- Open window cmd/terminal.
- Run
ssh-keygen
- Output will be like this
Enter file in which to save the key (C:\Users\user/.ssh/id_rsa):
- Copy location (given)
C:\Users\user/.ssh/id_rsa
- paste & press enter
Enter file in which to save the key (C:\Users\user/.ssh/id_rsa):C:\Users\user/.ssh/id_rsa
- Got to
C:\Users\user/.ssh/id_rsa
folder in your computer.- Rename
id_rsa.pub
file as you want eg.id_rsa_personal
,id_rsa_work
inC:\Users\user\.ssh
- repeat multiple time you want & rename it.
- create a file name
config
with no type & write the code like following code in 'config' file.Host work HostName github.com User git IdentityFile ~/.ssh/id_rsa_myOrganization Host personal HostName github.com User git IdentityFile ~/.ssh/id_rsa_teddy
- save it in
C:\Users\user\.ssh
- use ssh url to clone, write clone command like these
git clone work:user/repo.git
- go inside the repo & cofigure git user email, git user name with proper hostname.
- You Done.
To make file name case-sensitive in a folder use the bellow's command in administrative mode.
fsutil.exe file SetCaseSensitiveInfo C:\folder\path enable
To make file name case-insensitive in a folder use the bellow's command in administrative mode.
fsutil.exe file SetCaseSensitiveInfo C:\folder\path disable
N.B
C:\folder\path
is the file path in which folder you want make above operation