christianmlong + git + config   6

github deploy keys: how Do I authorize more than one repository for a single machine - Stack Overflow
The simplest solution I found was outlined here.

1) Enter this command(You'll do this for however many keys you need):

ssh-keygen -t rsa -C ""

2) When prompted with the the statement below type in a unique name(i.e.,foo1_rsa).The file will be created in your current directory and you may need to move it to .ssh if you want to be tidy:

Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]

3) Update your SSH config file:

vi ~/.ssh/config

Which may be empty:

Host cheech
IdentityFile ~/.ssh/foo1_rsa

Host chong
IdentityFile ~/.ssh/foo2_rsa
ssh  git  deploy  key  multiple  config 
october 2015 by christianmlong
Using Multiple Github Deploy Keys for a Single User on a Single Linux Server | Snipe.Net
Fortunately, the workaround here is very simple, using named SSH keys and an SSH config file.
ssh  git  deploy  key  multiple  config 
october 2015 by christianmlong
In what cases could `git pull` be harmful? - Stack Overflow
However, with all versions of Git, I recommend configuring a git up alias like this:

git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'

and using git up instead of git pull. I prefer this alias over git pull --ff-only because:

it works with all (non-ancient) versions of Git,
it fetches all upstream branches (not just the branch you're currently working on), and
it cleans out old origin/* branches that no longer exist upstream.
git  pull  up  alias  config  ff-only  merge 
july 2015 by christianmlong
git - Can I specify multiple users for myself in .gitconfig? - Stack Overflow
You can configure an individual repo to use a specific user / email address.

git config "Your Name Here"
git config

where as the default user / email is configured in your ~/.gitconfig

git config --global "Your Name Here"
git config --global
git  config  multiple  emails 
july 2015 by christianmlong

Copy this bookmark: