Last active
February 8, 2023 10:32
-
-
Save marcorodas/2755927df4f0ca3af90a to your computer and use it in GitHub Desktop.
Git: Uso de Comandos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone --depth=1 https://github.com/marcorodas/ApuntesAndroid.git ApuntesAndroid | |
| # git clone --depth=1 https://marco_rodas@bitbucket.org/johannfjs/siniestro_integrado.git Johann | |
| # clone: Crea una copia local del repositorio central al cual llamará "origin" | |
| # Crea una carpeta .git donde se almacenan todos los commit | |
| # --depth=1: Sólo el último commit | |
| git fetch | |
| # fetch: Importa commits del repositorio remoto al local. | |
| # (http://git-scm.com/docs/git-fetch) | |
| # Si no se especifica ningún repositorio se usará el repositorio remoto "origin" | |
| # Los guarda como branches remotos. No afecta la copia local. | |
| git reset --hard origin/master | |
| # reset: Establece el HEAD (top commit) de la rama actual al commit espeficicado. | |
| # (https://git-scm.com/docs/git-reset) | |
| # En este caso la rama "master" del repositorio remoto "origin" | |
| # --hard: Reinicia el índice y el directorio de trabajo | |
| # Los cambios fuera del commit especificado son eliminados. | |
| git rm build_opt.* dbchange.* db/standard_sql.* db/dbseguros.unix.sql | |
| # rm: Remueve archivos del directorio de trabajo y del índice | |
| # (https://www.kernel.org/pub/software/scm/git/docs/v1.6.0.6/git-rm.html) | |
| git status | |
| # Muestra las rutas con diferencia entre el índice y el commit actual HEAD | |
| git add | |
| # add: Agrega un contenido al índice (stage area) | |
| git commit | |
| # commit: Guarda el contenido actual del índice en un nuevo commit (snapshot) | |
| # El commit es local. | |
| git push origin master | |
| # push: Transfiere commits del repositorio local al remoto | |
| # origin master: Rama maestra (master) al servidor origen (origin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment