Installation

Configuring Git

Before you start working on Git, you have to configure your name and e-mail

git config --global user.name "your name"
git config --global user.email name@domain.com

Initializing a repository

If you want to create a repository in an existing project, just type the following command line:

cd myProject
git init .

This will create a folder named .git inside the current directory that contains the following files used by Git:

  • Config: This is used with the configuration for the local Git repository
  • HEAD: This lists a file that is the current head branch
  • Refs directory: This contains references to a commit for a branch