Skip to content

Git Basics

Git Basics

Ensure that the version of your Git Installation is > 1.8 with:

git --version

Global configurations

The first time you use git you need to configure:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

You can check your configuration at any time with:

git config --list

Local configurations

If you work with multiple GitHub/GitLab account you can set a name and an email for a specific repository without changing the global Git configuration with:

git config user.name "Your Name"
git config user.email "your.email@example.com"

You can check your local configurations at any time with:

git config --local --list

Branches

You can create a new branch with:

git branch branch-name

Reference Material

Git