Skip to content

How to use git

benoitbleuze edited this page Aug 25, 2012 · 3 revisions

How to use Git

Politeness first.

  • Present yourself:
git config --global user.name "Benoît Bleuzé"
git config --global user.email "not_my_address@server.net"

These will be valid across all your repositories.

  • Set end-lines for unix users:
git config --global core.autocrlf input
git config --global core.safecrlf true
  • And for Windows users (if you already are satisfied with what you set up during installation skip this):
git config --global core.autocrlf true
git config --global core.safecrlf true
  • Create a ssh key if you don't have one yet.
ssh-keygen

Follow the instructions given by ssh-keygen. You may use several keys on the same client, just give them different file names.


**Why or why not use a pass phrase? ** Once someone gets hold of you private key, if there is no passphrase he or she can use it to connect to any server with which you have registered the key, or in the case f many git servers, get access to your code. However if the key is to be used by non interactive scripts, on a continuous integration hast for instance, you may want to use a non encrypted private key. Just be sure you don't use it for anything else than accessing the necessary repositories and read only access if possible.

Jump to Single branch, Single local repository work

Clone this wiki locally