version control

SSH Key Auth for Two Github Accounts

Today I Learned Sometimes I have needed/wanted to keep authentication via SSH keys to my two Github accounts in the same machine. For such, the following arrangement in the .ssh/config file seems to work: Github Account Number 1: alex Host github.com-alex HostName github.com AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/alex-key IdentitiesOnly yes Github Account Number 2: xander Host github.com-xander HostName github.com AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/xander-key IdentitiesOnly yes Explanation: Host: It is like an alias for the host to which I will connect.

Git rm --cached FILENAME

Today I Learned If a file is added/tracked once by git and then added to the .gitignore list, it might continue to be tracked. Yes, despite being in the .gitignore list. it might have to do with the git cache and the way to workaround this is: git rm –cached FILENAME