Instala Git¶
Windows¶
1. Descargar git¶
- You have to be online all of the time as Android Studio downloads several updates!
- Cualquier versión de git sirve. Por ejemplo, https://git-scm.com/download/win.
- Asegúrese de tomar nota de la ruta de acceso de instalación. Lo necesitará en el siguiente paso.
2. Establecer ruta de acceso de git en Android Studio¶
Open File > Settings
Click the small triangle next to Version Control (1.) to open the sub-menu.
Click Git (2.).
Make sure update method “Merge” (3.) is selected.
Check if Android Studio can locate path to git.exe automatically by clicking the button “Test” (4.)
If automatic setting is successful git version will be displayed.
Click “OK” in the dialog box (1.) and “OK” in the settings window (2.).
In case file git.exe cannot be found click “OK” in the dialog box (1.) and then the button with the three dots (2.).
Use search function in windows explorer to find “git.exe” if you are unsure where it can be found. Está buscando git.exe ubicado en la carpeta bin.
Select path to git.exe and make sure you selected the one in \bin\ folder (3.) and click “OK” (4.).
Close settings window by clicking “OK” button (5.).
3. Reinicio¶
- Rearranque el PC para actualizar el entorno del sistema.
4. Comprobar configuración de git en Android Studio¶
Abrir ventana de terminal en Android Studio
Enter
git --version
(without quotation marks and no spaces between the two - [minus sign]!) and press ReturnSi git está instalado y conectado correctamente, recibirá una información sobre la versión instalada que se muestra de la siguiente manera:
Mac¶
- Cualquier versión de git sirve. Por ejemplo, https://git-scm.com/download/mac
- Utilice el homebrew para instalar git:
`$ brew install git`
. - Para obtener detalles sobre la instalación de git, consulte la documentación oficial del git.
- Si instala git a través de un homebrew, no es necesario cambiar ninguna preferencia. Solo por caso: se puedan encontrar aquí: Android Studio - Preferencias.