Contenido del Curso
Git Essentials
Git Essentials
Git Configuration
In fact, there are two ways to interact with Git:
- via a graphical interface, such as within a specific Integrated Development Environment (IDE);
- via the Terminal (Git Bash).
In this course, we will use the Terminal (Git Bash) to interact with Git since it is often a more convenient and faster approach. Additionally, understanding how to use the Terminal (Git Bash) will make it easier for you to use a graphical interface.
Note
We strongly recommend that you follow along on your computer throughout our course, running the commands and experimenting with them.
However, before running any commands, let's discuss how to open the Terminal (Git Bash) on your operating system.
Configuration
Now, let's proceed with the configuration. As we have already discussed, a Version Control System (VCS) should enable us to identify who made specific changes.
To achieve this, we need to configure some basic information in Git, specifically our username and email by setting respective values for them. To do so, run the following two commands:
Note
To run a certain command means to enter/paste this command in the terminal window and press the Enter key.
Here is an example of configuration:
Replace email@example.com
with your actual email address and username
with your preferred username (do not remove double quotes). It is advisable to set your username to Firstname Lastname
, where Firstname
is your first name and Lastname
is your last name.
As you can see, the fundamental command here is git config
. When used with the --global
flag, it sets the value for all Git repositories you will use. Later in the course, we will also cover how to set different values for specific repositories.
¡Gracias por tus comentarios!