-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitHubCommandsForRemote.txt
More file actions
27 lines (19 loc) · 1.2 KB
/
gitHubCommandsForRemote.txt
File metadata and controls
27 lines (19 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Trabajo Remoto.
git clone url_del_servidor_remoto: Nos permite descargar los archivos de la última versión de la rama principal y todo el historial de cambios en la carpeta .git.
git push: Luego de hacer git add y git commit debemos ejecutar este comando para mandar los cambios al servidor remoto.
git fetch: Lo usamos para traer actualizaciones del servidor remoto y guardarlas en nuestro repositorio local (en caso de que hayan, por supuesto).
git merge: También usamos el comando git fetch con servidores remotos. Lo necesitamos para combinar los últimos cambios del servidor remoto y nuestro directorio de trabajo.
git pull: Básicamente, git fetch y git merge al mismo tiempo.
git remote add origin git@github.com:calguzman/github.git // Agregar un repositorio Remoto
git remote // Muestra los repositorios remotos asociados a el repo local.
Conectando Git Remote.
…or create a new repository on the command line
echo "# github" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin <URL REMOTE>
git push -u origin master
…or push an existing repository from the command line
git remote add origin <URL REMOTE REPO>
git push -u origin master