Skip to content

Instantly share code, notes, and snippets.

@jorgeacaballero
Last active August 29, 2015 13:56
Show Gist options
  • Save jorgeacaballero/9293395 to your computer and use it in GitHub Desktop.
Save jorgeacaballero/9293395 to your computer and use it in GitHub Desktop.
Configuración de Git
  1. Primero ir a Github y serciorarse que su SSH key este configurada con su computadora: https://github.com/settings/ssh

  2. Ir a la carpeta pymeSolutions

  3. Configurar su nombre y correo:

$ git config --global user.name "Su Nombre Aqui"
$ git config --global user.email [email]@unitec.edu
  1. El lider del grupo tiene que crear el branch de su equipo, ejemplo de ventas:
$ git checkout -b ventas
Switched to a new branch 'ventas'
$ git push origin ventas
Total 0 (delta 0), reused 0 (delta 0)
To [email protected]:jorgeacaballero/pymeSolutions.git
 * [new branch]      ventas -> ventas
  1. Los usuarios deberán hacer un fetch para recibir las modificaciones del branch nuevo:
$ git fetch -p
 + [created]         (none)     -> origin/ventas
  1. Los usuarios al elegir una tarjeta de Trello deberan crear un branch BAJO el branch de su modulo con el siguiente formato:

Link de una tarjeta de Trello: https://trello.com/c/4wrpWARa/13-configuracion-caja

Tomar la ultima ruta: 13-configuracion-caja

Cerciorarse que la branch sera creada bajo el branch de su modulo:

$ git status
# On branch ventas
nothing to commit, working directory clean

Si no estan en el branch de su modulo, cambiarse manualmente:

$ git checkout ventas
Switched to branch 'ventas'

Una vez dentro del branch de su modulo, crear el nuevo branch que estaran trabajando:

$ git checkout -b 13-configuracion-caja
Switched to a new branch '13-configuracion-caja'
$ git push origin 13-configuracion-caja
To [email protected]:jorgeacaballero/pymeSolutions.git
 * [new branch]      13-configuracion-caja -> 13-configuracion-caja

Listo!

Trabajar normalmente en su tarea e ir haciendo commits a lo largo del trabajo:

git status
# On branch 13-configuracion-caja
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#	modified:   Archivo que han trabajado
#	modified:   Otro archivo que han trabajado
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	Archivo nuevo que han creado

Si tienen el caso anterior que hay archivos nuevos, hay que agregarlos:

$ git add .
$ git status
# On branch 13-configuracion-caja
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#	modified:   Archivo que han trabajado
#	modified:   Otro archivo que han trabajado
#	created:    Archivo nuevo que han creado

Hacer un commit y push:

$ git commmit -am "Crear una caja esta listo, tengo problemas con el estado de la caja"
[13-configuracion-caja 4d4ef86] Crear una caja esta listo, tengo problemas con el estado de la caja
 36 files changed, 2739 insertions(+), 5 deletions(-)
 ...
 ...
 
$ git push origin 13-configuracion-caja
Counting objects: 57, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (48/48), 25.79 KiB | 0 bytes/s, done.
Total 48 (delta 10), reused 0 (delta 0)
To [email protected]:jorgeacaballero/pymeSolutions.git
   4764d50..4d4ef86  13-configuracion-caja -> 13-configuracion-caja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment