how to setup multiple github ssh keys

1. create multiple ssh key ssh-keygen -t rsa -C "[email protected]" for example, 2 keys create at: ~/.ssh/id_rsa ~/.ssh/id_rsa_sli_racingwithhorse 2. then, add these two keys as following ssh-add ~/.ssh/id_rsa ssh-add ~/.ssh/id_rsa_sli_racingwithhorse check your saved keys using: ssh-add -l 3. modify the ssh config cd ~/.ssh/ touch config $==> cat config #gmail.com account Host github.com HostName github.com User git IdentityFile ~/.ssh/id_rsa #racingwithhorse account Host github.com-racingwithhorse HostName github.com User git IdentityFile ~/.ssh/id_rsa_sli_racingwithhorse 4. clone you repo and modify your git config git config user.name "racingwithhorse" git config user.email "[email protected]" then inside the cloned git repository ...

December 13, 2016 · 1 min · mousepotato

How to revert github source code to a specific commit

如何将Github的代码回退到某一个指定的提交版本 How to revert Github source code to a specific commit git reset --hard "old-commit-id" git push -f

June 20, 2013 · 1 min · mousepotato