Skip to content

Commit 546a15d

Browse files
authored
Merge pull request MichaelCade#403 from manuelver/feature/translateES-12
2 parents e1b6867 + 13d6bdc commit 546a15d

9 files changed

Lines changed: 545 additions & 492 deletions

File tree

642 KB
Loading

2022/es/Days/day36.md

Lines changed: 70 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,154 @@
1-
## Installing & Configuring Git
1+
## Instalación y configuración de Git
22

3-
Git is an open source, cross-platform tool for version control. If you are like me, using Ubuntu or most Linux environments you might find that you already have git installed but we are going to run through the install and configuration.
3+
Git es una herramienta multiplataforma de código abierto para el control de versiones. En la mayoría de entornos Linux viene instalado por defecto, pero de todas formas vamos a repasar la instalación y configuración.
44

5-
Even if you already have git installed on your system it is also a good idea to make sure we are up to date.
5+
Incluso si ya tienes git instalado en tu sistema es una buena idea asegurarse de que está actualizado.
66

7-
### Installing Git
7+
### Instalación de Git
88

9-
As already mentioned Git is cross-platform, we will be running through Windows and Linux but you can find macOS also listed [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
9+
Como ya se ha mencionado Git es multiplataforma, vamos a ver Windows y Linux, pero también puedes encontrar macOS en la lista de [descargas](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
1010

11-
For [Windows](https://git-scm.com/download/win) we can grab our installers from the official site.
11+
Para [Windows](https://git-scm.com/download/win) podemos obtener nuestros instaladores desde el sitio oficial o también puedes usar `winget`, Windows Application Package Manager.
1212

13-
You could also use `winget` on your Windows machine, think of this as your Windows Application Package Manager.
14-
15-
Before we install anything let's see what version we have on our Windows Machine. Open a PowerShell window and run `git --version`
13+
Antes de instalar nada vamos a ver qué versión tenemos en nuestra máquina Windows. Abre una ventana de PowerShell y ejecuta `git --version`.
1614

1715
![](Images/Day36_Git1.png)
1816

19-
We can also check our WSL Ubuntu version of Git as well.
17+
También podemos comprobar nuestra versión en el [WSL](https://es.wikipedia.org/wiki/Subsistema_de_Windows_para_Linux) Ubuntu.
2018

2119
![](Images/Day36_Git2.png)
2220

23-
At the time of writing the latest Windows release is `2.35.1` so we have some updating to do there which I will run through. I expect the same for Linux.
24-
25-
I went ahead and downloaded the latest installer and ran through the wizard and will document that here. The important thing to note is that git will uninstall previous versions before installing the latest.
21+
En el momento de escribir esto la última versión de Windows es `2.35.1` por lo que tenemos que actualizarla. Lo mismo con Linux.
2622

27-
Meaning that the process shown below is also the same process for the most part as if you were installing from no git.
23+
Descargué el último instalador y ejecuté el asistente. Lo importante a tener en cuenta es que git desinstalará las versiones anteriores antes de instalar la última. Lo que significa que el proceso que se muestra a continuación es también el mismo proceso en su mayor parte como si estuviera instalando por primera vez.
2824

29-
It is a very simple installation. Once downloaded double click and get started. Read through the GNU license agreement. But remember this is free and open-source software.
25+
Es una instalación muy sencilla. Una vez descargado haga doble clic y comience. Lea el acuerdo de licencia GNU. Pero recuerde que este es un software libre y de código abierto.
3026

3127
![](Images/Day36_Git3.png)
3228

33-
Now we can choose additional components that we would like to also install but also associate with git. On Windows, I always make sure I install Git Bash as this allows us to run bash scripts on Windows.
29+
Ahora podemos elegir componentes adicionales que nos gustaría también instalar para asociar con git. En Windows, siempre me aseguro de instalar Git Bash ya que nos permite ejecutar scripts bash en Windows.
3430

3531
![](Images/Day36_Git4.png)
3632

37-
We can then choose which SSH Executable we wish to use. IN leave this as the bundled OpenSSH that you might have seen in the Linux section.
33+
Podemos entonces elegir qué ejecutable SSH deseamos utilizar.
3834

3935
![](Images/Day36_Git5.png)
4036

41-
We then have experimental features that we may wish to enable, for me I don't need them so I don't enable them, you can always come back in through the installation and enable these later on.
37+
Luego tenemos características experimentales que podemos habilitar, yo no las necesito así que no las habilito, siempre puedes volver a la instalación y habilitarlas más tarde.
4238

4339
![](Images/Day36_Git6.png)
4440

45-
Installation complete, we can now choose to open Git Bash and or the latest release notes.
41+
Instalación completada, ahora podemos elegir abrir Git Bash y o las últimas notas de la versión.
4642

4743
![](Images/Day36_Git7.png)
4844

49-
The final check is to take a look in our PowerShell window at what version of git we have now.
45+
La comprobación final es echar un vistazo en PowerShell la versión actual de git.
5046

5147
![](Images/Day36_Git8.png)
5248

53-
Super simple stuff and now we are on the latest version. On our Linux machine, we seemed to be a little behind so we can also walk through that update process.
49+
Super simple y ahora estamos en la última versión.
5450

55-
I simply run the `sudo apt-get install git` command.
51+
En nuestra máquina Linux el proceso de actualización resulta más directo ejecutando el comando `sudo apt-get install git`.
5652

5753
![](Images/Day36_Git9.png)
5854

59-
You could also run the following which will add the git repository for software installations.
55+
También puedes añadir el repositorio git para las actualizaciones del software.
6056

61-
```
57+
```shell
6258
sudo add-apt-repository ppa:git-core/ppa -y
6359
sudo apt-get update
64-
sudo apt-get install git -y
60+
sudo apt-get install git -yinstalaciones
6561
git --version
6662
```
6763

68-
### Configuring Git
64+
### Configurando Git
6965

70-
When we first use git we have to define some settings,
66+
Cuando usamos git por primera vez tenemos que definir algunas configuraciones,
7167

72-
- Name
73-
- Email
74-
- Default Editor
75-
- Line Ending
68+
- Nombre de usuario
69+
- Correo electrónico
70+
- Editor por defecto
71+
- Fin de línea
7672

77-
This can be done at three levels
73+
Esto se puede hacer en tres niveles
7874

79-
- System = All users
80-
- Global = All repositories of the current user
81-
- Local = The current repository
75+
- Sistema = Todos los usuarios
76+
- Global = Todos los repositorios del usuario actual
77+
- Local = El repositorio actual
8278

83-
Example:
84-
`git config --global user.name "Michael Cade"`
85-
`git config --global user.email Michael.Cade@90DaysOfDevOPs.com"`
86-
Depending on your Operating System will determine the default text editor. In my Ubuntu machine without setting the next command is using nano. The below command will change this to visual studio code.
79+
Ejemplo:
80+
```shell
81+
git config --global user.name "Michael Cade"
82+
git config --global user.email "Michael.Cade@90DaysOfDevOPs.com"
83+
```
84+
Dependiendo del sistema operativo se determinará el editor de texto por defecto. En Ubuntu sin configurar el siguiente comando está utilizando nano. El siguiente comando cambiará esto a visual studio code.
8785

88-
`git config --global core.editor "code --wait"`
86+
```shell
87+
git config --global core.editor "code --wait"
88+
```
8989

90-
now if we want to be able to see all git configurations then we can use the following command.
90+
Podemos ver todas las configuraciones de git con el siguiente comando.
9191

92-
`git config --global -e`
92+
```shell
93+
git config --global -e
94+
```
9395

9496
![](Images/Day36_Git10.png)
9597

96-
On any machine this file will be named `.gitconfig` on my Windows machine you will find this in your user account directory.
98+
En cualquier máquina este archivo se llamará `.gitconfig`. En Windows lo encontrarás en el directorio de la cuenta de usuario.
9799

98100
![](Images/Day36_Git11.png)
99101

100-
### Git Theory
102+
### Teoría Git
101103

102-
I mentioned in the post yesterday that there were other version control types and we can split these down into two different types. One is Client Server and the other is Distributed.
104+
Mencioné en el post de ayer que había otros tipos de control de versiones y podemos dividirlos en dos tipos diferentes. Los que son Cliente-Servidor y los que son Distribuidos.
103105

104-
### Client-Server Version Control
106+
### Control de versiones Cliente-Servidor
105107

106-
Before git was around Client-Server was the defacto method for version control. An example of this would be [Apache Subversion](https://subversion.apache.org/) which is an open source version control system founded in 2000.
108+
Antes de que existiera git, el tipo de Cliente-Servidor era el método de facto para el control de versiones. Un ejemplo de esto sería [Apache Subversion](https://subversion.apache.org/) que es un sistema de control de versiones de código abierto fundado en el año 2000.
107109

108-
In this model of Client-Server version control, the first step the developer downloads the source code and the actual files from the server. This doesn't remove the conflicts but it does remove the complexity of the conflicts and how to resolve them.
110+
En este modelo de control de versiones Cliente-Servidor, el primer paso que da el desarrollador es descargar el código fuente y los archivos reales del servidor. Esto no elimina los conflictos, pero sí la complejidad de los conflictos y cómo resolverlos.
109111

110112
![](Images/Day36_Git12.png)
111113

112-
Now for example let's say we have two developers working on the same files and one wins the race and commits or uploads their file back to the server first with their new changes. When the second developer goes to update they have a conflict.
114+
Ahora, por ejemplo, digamos que tenemos dos desarrolladores trabajando en los mismos archivos y uno gana la carrera y confirma o sube su archivo de nuevo al servidor en primer lugar con sus nuevos cambios. Cuando el segundo desarrollador va a actualizar tiene un conflicto.
113115

114116
![](Images/Day36_Git13.png)
115117

116-
So now the Dev needs to pull down the first devs code change next to their check and then commit once those conflicts have been settled.
118+
Así que ahora el desarrollador tiene que tirar hacia abajo el primer cambio de código junto a su cheque y luego confirmar una vez que los conflictos se han resuelto.
117119

118120
![](Images/Day36_Git15.png)
119121

120-
### Distributed Version Control
122+
### Control de versiones distribuido
121123

122-
Git is not the only distributed version control system. But it is very much the defacto.
124+
Git no es el único sistema de control de versiones distribuido. Pero es en gran medida el defacto.
123125

124-
Some of the major benefits of Git are:
126+
Algunos de los principales beneficios de Git son:
125127

126-
- Fast
127-
- Smart
128+
- Rápido
129+
- Inteligente
128130
- Flexible
129-
- Safe & Secure
131+
- Seguro
130132

131-
Unlike the Client-Server version control model, each developer downloads the source repository meaning everything. History of commits, all the branches etc.
133+
A diferencia del modelo de control de versiones Cliente-Servidor, cada desarrollador descarga el repositorio fuente, es decir, todo. Historial de commits, todas las ramas, etc.
132134

133135
![](Images/Day36_Git16.png)
134136

135-
## Resources
137+
## Recursos
136138

137139
- [What is Version Control?](https://www.youtube.com/watch?v=Yc8sCSeMhi4)
138140
- [Types of Version Control System](https://www.youtube.com/watch?v=kr62e_n6QuQ)
139141
- [Git Tutorial for Beginners](https://www.youtube.com/watch?v=8JJ101D3knE&t=52s)
140142
- [Git for Professionals Tutorial](https://www.youtube.com/watch?v=Uszj_k0DGsg)
141143
- [Git and GitHub for Beginners - Crash Course](https://www.youtube.com/watch?v=RGOj5yH7evk&t=8s)
142144
- [Complete Git and GitHub Tutorial](https://www.youtube.com/watch?v=apGV9Kg7ics)
143-
144-
See you on [Day 37](day37.md)
145+
- [En español] [Comandos Git](https://gitea.vergaracarmona.es/man-linux/comandos-git)
146+
- [En español][Apuntes Curso de Git](https://vergaracarmona.es/wp-content/uploads/2022/10/Curso-git_vergaracarmona.es_.pdf) de [Juan Carlos Rubio](https://www.linkedin.com/in/juan-carlos-rubio-pineda/Curso-git_vergaracarmona-es).
147+
- [En español] En los [apuntes](https://vergaracarmona.es/apuntes/) del traductor:
148+
- ["Instalar git en ubuntu"](https://vergaracarmona.es/instalar-git-en-ubuntu/)
149+
- ["Comandos de git"](https://vergaracarmona.es/comandos-de-git/)
150+
- ["Estrategias de fusión en git: Ship / Show / Ask"](https://vergaracarmona.es/estrategias-bifurcacion-git-ship-show-ask/)
151+
- ["Resolver conflictos en Git. Merge, Squash, Rebase o Pull"](https://vergaracarmona.es/merge-squash-rebase-pull/)
152+
- ["Borrar commits de git: reset, rebase y cherry-pick"](https://vergaracarmona.es/reset-rebase-cherry-pick/)
153+
154+
Nos vemos en el [Día 37](day37.md)

0 commit comments

Comments
 (0)