Version Control with Git
Setting Up Git
gitthe first time is used on a computer.
- Understand the meaning of the
When we use Git on a new computer for the first time, we need to configure a few things. Here’s how Dracula sets up his new laptop:
$ git config --global user.name "Vlad Dracula" $ git config --global user.email "email@example.com" $ git config --global color.ui "auto"
(Please use your own name and email address instead of Dracula’s.)
He also has to set his favorite text editor, following this table:
|Sublime Text (Mac)||
|Sublime Text (Win)||
Git commands are written
git verb, where
verb is what we actually want it to do. In this case, we’re telling Git:
- our name and email address,
- to colorize output,
- what our favorite text editor is, and
- that we want to use these settings globally (i.e., for every project),
The four commands above only need to be run once: the flag
--global tells Git to use the settings for every project on this computer.
You can check your settings at any time:
$ git config --list
You can change your configuration as many times as you want: just use the same commands to choose another editor or update your email address.