Starting with git

Posted on: ven 09/09/2016 - 13:42 By: admin

Getting Started

To use Git you will have to setup a repository. You can take an existing directory to make a Git repository, or create an empty directory.

To make your current directory a Git repository we simply run init.

git init

To make a new directory that is a Git repository we just specify a directory.

git init newrepo

From here on out we'll assume that you are in the root of the Git repository unless otherwise noted.
Adding New Files

Multiple GitHub & SSH Config

Posted on: ven 09/09/2016 - 12:06 By: admin

Step 1: ssh keys
Create any keypairs you'll need. In this example I've named me default/original 'id_rsa' (which is the default) and my new one 'id_rsa-work':

ssh-keygen -t rsa -C ""

Step 2: ssh config
Set up multiple ssh profiles by creating/modifying ~/.ssh/config. Note the slightly differing 'Host' values:

# Default GitHub
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa

S'abonner à