Skip to content

Instantly share code, notes, and snippets.

View krmckone's full-sized avatar
💭
resetting the router

Kaleb McKone krmckone

💭
resetting the router
View GitHub Profile
@krmckone
krmckone / git_update_from_main.sh
Last active June 14, 2024 15:54
Updates current branch from main and pushes
git fetch --prune
this_branch=$(git rev-parse --abbrev-ref HEAD)
git checkout main && git pull origin main && git checkout $this_branch && git pull origin main && git push
unset this_branch
@krmckone
krmckone / multiple-ssh-keys-krm.md
Last active December 12, 2020 23:18
Use multiple SSH keys for multiple GitHub accounts without modifying ~/.ssh/config

Using multiple SSH Keys for multiple GitHub accounts

If you are using separate GitHub accounts to help manage different silos of work (personal, work, etc), you can use a combination of directory structure and .gitconfig files to manage your commit authorship details and SSH keys.

Ensure that you have already created/added SSH keys to ssh-agent and have added them to your corresponding GitHub accounts.

Other guides on this problem encourage modifying your ~/.ssh/config file to use a different SSH key