Untrack/Remove git files

If you accidentally committed files on git because you didn’t have a .gitignore file or you just updated it, you can untrack files with: 1 git rm --cached <file> or if you have several files: 1 git rm --cached `git ls-files -i -c --exclude-from=.gitignore`

April 15, 2024 · 1 min · Elvin Guti

How to setup multiple ssh keys for different github repos

Create key and add it to github Create ssh key: 1 ssh-keygen -t ed25519 -C "your_email@example.com" Add your key to agent: 1 ssh-add ~/.ssh/elvinguti_key Add key to github. Update config Update ~/.ssh/config: 1 2 3 4 5 6 7 8 9 10 Host github.com HostName github.com IdentityFile ~/.ssh/my_work_key IdentitiesOnly yes Host elvinguti.github.com HostName github.com User elvinguti IdentityFile ~/.ssh/elvinguti_key IdentitiesOnly yes you might need to restart the ssh-agent: ...

April 12, 2024 · 1 min · Elvin Guti