Top Banner
@fgortazar @micael_gallego Una introducción práctica a Git
113

Taller Git en la URJC

Jun 21, 2015

Download

Technology

sidelab

Taller Git que impartimos Francisco Gortázar (@fgortazar) y Micael Gallego (@micael_gallego) en la Escuela Técnica Superior de Ingeniería Informática de la URJC.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Taller Git en la URJC

@fgortazar

@micael_gallego

Una introducción práctica a Git

Page 2: Taller Git en la URJC

Who are we?

• Francisco Gortázar (aka Patxi) ▫ Desarrollador Java ▫ Co-fundador 2ndepisode ▫ Formador Java, Spring, Maven, JVM...

▫ Siempre mejorando los procesos de desarrollo

▫ Actualmente jugando el rol de devop en 2nd

▫ Profesor e investigador en @urjc

Page 3: Taller Git en la URJC

Who are we?

• Micael Gallego (aka Mica) ▫ Desarrollador Java

▫ Scrum Máster y Arquitecto en Kurento.org

▫ Profesor y formador

▫ Investigador @urjc: Algoritmos de optimización

Page 5: Taller Git en la URJC

Introducción

• Git es un SCM distribuido (DSCM) ▫ Cada desarrollador tiene

una copia del repositorio

▫ No hay concepto de repositorio centralizado Ya… pero al final suele

haberlo

Page 6: Taller Git en la URJC

Introducción

• Características:

Snapshots

Integridad

Los 4 estados

Las 3 áreas

La identidad

Page 7: Taller Git en la URJC

Introducción

• Características: Snapshots

No se guardan diferencias… se guardan snapshots

Page 8: Taller Git en la URJC

Introducción

• Características: Integridad

Los commits se identifican por un hash sha1 Svn: rev 33

Git: d025a7b3217f05110ebbf48065b8d02a0ad22ae3 O más amigablemente: d025a7b

Los ficheros también se identifican por su sha1 Si un fichero se corrompe durante la transmisión por

la red se detecta inmediatamente

Page 9: Taller Git en la URJC

Introducción

• Características: Los 4 estados

Los ficheros en git pueden estar en cuatro estados: Untracked: el fichero no está bajo “control” de git Tracked: el fichero está bajo “control” de git, y puede

estar en uno de los siguientes tres estados: Modificado: el fichero ha cambiado desde el último

checkout Staged: un fichero modificado ha sido marcado para ser

añadido en el próximo commit Committed: el fichero se encuentra en la base de datos

de git

Page 10: Taller Git en la URJC

Introducción

Page 11: Taller Git en la URJC

Introducción

• Características: Las 3 áreas de un proyecto git

El directorio git (git directory) Contiene los metadatos y la base de datos de git Es lo que se copia cuando se clona un repositorio Normalmente es una carpeta .git en algún directorio

La carpeta de trabajo (working directory) Es un checkout de una versión específica del proyecto Se extrae del directorio git Es el espacio donde modificamos los ficheros

Staging area Fichero en el directorio .git que indica qué cambios van en

el próximo commit

Page 12: Taller Git en la URJC

Introducción

• Características: La identidad

Git necesita conocer algunos datos del desarrollador (aparecen en los commits para identificar al autor) Nombre Email

Si no están correctamente configurados… atente a las consecuencias Los commits fallan porque el usuario no está autorizado Commits del mismo usuario “físico” no son considerados

como del mismo usuario porque el nombre “lógico” cambia

Page 13: Taller Git en la URJC

Introducción

• Hands on... Instalación de git

sudo apt-get install git

Msysgit (http://msysgit.github.com/)

Page 14: Taller Git en la URJC

Introducción

• Características: La identidad (y 2)

~/.gitconfig:

patxi@patxi-PORTEGE-R830:~$ cat .gitconfig

[user]

name = patxigortazar

email = [email protected]

> git config --global user.name “patxigortazar”

> git config --global user.email “[email protected]

Follow The Yellow Brick Road: http://git-scm.com/book/en/Customizing-Git-Git-Configuration

gitrepo> git config user.name “patxigortazar”

gitrepo> git config user.email “[email protected]

Page 15: Taller Git en la URJC

Introducción

• Características: La identidad (y 3)

Who am I?

patxi@patxi-PORTEGE-R830:~$ git config --list

user.name=patxigortazar

[email protected]

Page 16: Taller Git en la URJC

Introducción

• Clientes git

En Eclipse Egit (viene por defecto en las últimas versiones)

CLI Linux client sudo apt-get install git

gitg, gitk

Windows Msysgit: http://msysgit.github.com/ Tortoise Git (requiere msysgit):

http://code.google.com/p/tortoisegit/wiki/Download

Mac SourceTree: http://www.sourcetreeapp.com/ Gitbox (simple): http://www.gitboxapp.com/

Page 17: Taller Git en la URJC

Comenzando

• Crear un repositorio en local

$ mkdir myrepo && cd myrepo

myrepo$ git init

Initialized empty Git repository in

/home/patxi/git/myrepo/.git/

myrepo$ git status

# On branch master

#

# Initial commit

#

nothing to commit (create/copy files and use

"git add" to track)

Page 18: Taller Git en la URJC

Comenzando

• Crear un fichero

myrepo$ echo “Hi, git” > README.md

myrepo$ git status

# On branch master

# Initial commit

# Untracked files:

# (use "git add <file>..." to include in

what will be committed)

# README.md

nothing added to commit but untracked files

present (use "git add" to track)

Page 19: Taller Git en la URJC

Comenzando

• Añadir el fichero

myrepo$ git add README.md

myrepo$ git status

# On branch master

#

# Initial commit

#

# Changes to be committed:

# (use "git rm --cached <file>..." to

unstage)

#

# new file: README.md

Page 20: Taller Git en la URJC

Comenzando

• Estamos listos... commit!

myrepo$ git commit

[master (root-commit) 1dca654] Repo initialization

1 file changed, 1 insertion(+)

create mode 100644 README.md

myrepo$ git status

# On branch master

nothing to commit (working directory clean)

Page 21: Taller Git en la URJC

Pongámonos serios

• Crear una cuenta en Github

http://github.com

Page 22: Taller Git en la URJC

Pongámonos serios

• Generación de claves

Generar claves para acceso a repositorios remotos Ubuntu ssh-keygen -t rsa

Copiar el contenido del fichero ~/.ssh/id_rsa.pub en la configuración de nuestra cuenta de github

Windows Git bash ssh-keygen.exe

Copiar el contenido del fichero c:/documents and settings/<usuario>/.ssh/id_rsa.pub

Page 23: Taller Git en la URJC

Pongámonos serios

• Crear un repositorio en github

Inicializarlo con un README

• Clonar un repositorio (usar ssh)

myrepo$ git clone [email protected]:gortazar/mygithubrepo.git

Cloning into 'mygithubrepo'...

remote: Counting objects: 3, done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 3 (delta 0), reused 0 (delta 0)

Unpacking objects: 100% (3/3), done.

$ cd mygithubrepo

mygithubrepo$

Page 24: Taller Git en la URJC

Pongámonos serios

• Clonar el repositorio remoto tiene consecuencias:

El repositorio local guarda localmente información sobre el repositorio remoto (llamado por defecto “origin”)

Esto permite subir/bajar cambios al/desde repositorio remoto

Las ramas refs/heads/* del repositorio remoto se almacenan en el repositorio local como refs/remotes/origin/*

Ver .git/config

Page 25: Taller Git en la URJC

Pongámonos serios

• .git/config

[core]

repositoryformatversion = 0

filemode = true

bare = false

logallrefupdates = true

[remote "origin"]

fetch = +refs/heads/*:refs/remotes/origin/*

url = [email protected]:gortazar/mygithubrepo.git

[branch "master"]

remote = origin

merge = refs/heads/master

Page 26: Taller Git en la URJC

Pongámonos serios

• Hacer algunos cambios

$ echo "Some change" >> README.md

$ git status

# On branch master

# 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: README.md

no changes added to commit (use "git add" and/or "git

commit -a")

Page 27: Taller Git en la URJC

Pongámonos serios

• Y commit

$ git add README

$ git commit -m “Improved doc”

$ git status

# On branch master

# Your branch is ahead of 'origin/master' by 1 commit.

#

nothing to commit (working directory clean)

Page 28: Taller Git en la URJC

Pongámonos serios

• Subir cambios al repositorio remoto

$ git push origin

Counting objects: 5, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (2/2), done.

Writing objects: 100% (3/3), 313 bytes, done.

Total 3 (delta 0), reused 0 (delta 0)

To [email protected]:gortazar/mygithubrepo.git

f0b5ef1..6c2373a master -> master

Page 29: Taller Git en la URJC

Pongámonos serios

• Traer cambios del repositorio remoto

$ git status

# On branch master

nothing to commit (working directory clean)

$ git fetch

remote: Counting objects: 5, done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 3 (delta 0), reused 3 (delta 0)

Unpacking objects: 100% (3/3), done.

From github.com:gortazar/mygithubrepo

6c2373a..ae87f75 master -> origin/master

Page 30: Taller Git en la URJC

Pongámonos serios

• Traer cambios del repositorio remoto

$ git status

# On branch master

# Your branch is behind 'origin/master' by 1 commit, and

can be fast-forwarded.

#

nothing to commit (working directory clean)

$ git pull origin

Updating 6c2373a..ae87f75

Fast-forward

another_file.txt | 1 +

1 file changed, 1 insertion(+)

create mode 100644 another_file.txt

Page 31: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si dos desarrolladores suben cambios?

$ echo “New file A” > fileA.txt

$ git add fileA.txt

$ git commit -m “New file A added”

$ git push

Page 32: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si dos desarrolladores suben cambios?

$ echo “New file B” > fileB.txt

$ git add fileB.txt

$ git commit -m “New file B added”

$ git push

To [email protected]:gortazar/mygithubrepo.git

! [rejected] master -> master (non-fast-forward)

error: failed to push some refs to

'[email protected]:gortazar/mygithubrepo.git'

To prevent you from losing history, non-fast-forward

updates were rejected

Merge the remote changes (e.g. 'git pull') before pushing

again.

Page 33: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si dos desarrolladores suben cambios?

$ git pull

remote: Counting objects: 11, done.

remote: Compressing objects: 100% (4/4), done.

remote: Total 8 (delta 2), reused 8 (delta 2)

Unpacking objects: 100% (8/8), done.

From github.com:gortazar/mygithubrepo

bd63f2d..6834389 master -> origin/master

Merge made by the 'recursive' strategy.

fileA.txt | 2 ++

1 file changed, 2 insertions(+)

create mode 100644 fileA.txt

Page 34: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si dos desarrolladores suben cambios?

$ git log --oneline

f677bf3 Merge branch 'master' of

github.com:gortazar/mygithubrepo

bd63f2d New file B added

00cb814 File A added

6566348 Fixed appendix

e4f1f88 Apendice

24d5588 Adenda

ae87f75 Master diverged...

6c2373a Improved doc

f0b5ef1 Initial commit

Page 35: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si dos desarrolladores suben cambios?

No olvidemos subir el merge

$ git push

Page 36: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si hay conflictos? $ echo “Adenda” >> another_file.txt

$ git add another_file.txt

$ git commit -m “Adenda”

$ git push

Counting objects: 5, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (2/2), done.

Writing objects: 100% (3/3), 317 bytes, done.

Total 3 (delta 0), reused 0 (delta 0)

To [email protected]:gortazar/mygithubrepo.git

ae87f75..24d5588 master -> master

Page 37: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si hay conflictos? $ echo “Apendice” >> another_file.txt

$ git add another_file.txt

$ git commit -m “Apendice”

$ git push

To [email protected]:gortazar/mygithubrepo.git

! [rejected] master -> master (non-fast-forward)

error: failed to push some refs to

'[email protected]:gortazar/mygithubrepo.git'

To prevent you from losing history, non-fast-forward

updates were rejected

See theMerge the remote changes (e.g. 'git pull') before

pushing again.

'Note about fast-forwards' section of 'git push --help'

for details.

Page 38: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si hay conflictos?

Usamos git pull para mezclar los cambios $ git pull

remote: Counting objects: 6, done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 3 (delta 0), reused 3 (delta 0)

Unpacking objects: 100% (3/3), done.

From github.com:gortazar/mygithubrepo

ae87f75..24d5588 master -> origin/master

Auto-merging another_file.txt

CONFLICT (content): Merge conflict in another_file.txt

Automatic merge failed; fix conflicts and then commit the

result.

Page 39: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si hay conflictos?

git status nos dice cómo solucionarlo $ git status

# On branch master

# Your branch and 'origin/master' have diverged,

# and have 1 and 1 different commit each, respectively.

#

# Unmerged paths:

# (use "git add/rm <file>..." as appropriate to mark

resolution)

#

# both modified: another_file.txt

no changes added to commit (use "git add" and/or "git

commit -a")

Page 40: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si hay conflictos?

Arreglamos los ficheros con conflictos A different file

<<<<<<< HEAD

Apendice

=======

adenda

>>>>>>> 24d5588fcc559da7135932a3a364596b6a772364

A different file

Apendice

adenda

Page 41: Taller Git en la URJC

Pongámonos serios

• ¿Qué pasa si hay conflictos?

Con git add indicamos que solucionamos el conflicto

Commit, push y listo

$ git add another_file.txt

$ git commit -m “Fixed appendix”

$ git push

Counting objects: 10, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (4/4), done.

Writing objects: 100% (6/6), 646 bytes, done.

Total 6 (delta 0), reused 0 (delta 0)

To [email protected]:gortazar/mygithubrepo.git

24d5588..6566348 master -> master

Page 42: Taller Git en la URJC

Ramas y tags

• Creación de ramas

$ git checkout -b cool_feature

Switched to a new branch 'cool_feature'

$ git status

# On branch cool_feature

nothing to commit (working directory clean)

Page 43: Taller Git en la URJC

Ramas y tags

• Hacer algún cambio $ echo "puts 'Hola, mundo'" > hola.rb

$ git add hola.rb

$ git commit -m "Added my first ruby code"

[cool_feature 6a3a19d] Added my first ruby code

1 file changed, 1 insertion(+)

create mode 100644 hola.rb

$ git status

# On branch cool_feature

nothing to commit (working directory clean)

Page 44: Taller Git en la URJC

Ramas y tags

• ¿Queremos compartir la rama? $ git push -u origin cool_feature

Counting objects: 4, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (2/2), done.

Writing objects: 100% (3/3), 316 bytes, done.

Total 3 (delta 0), reused 0 (delta 0)

To [email protected]:gortazar/mygithubrepo.git

* [new branch] cool_feature -> cool_feature

Page 45: Taller Git en la URJC

Ramas y tags

• ¿Queremos compartir la rama? $ cat .git/config

[core]

...

[remote "origin"]

fetch = +refs/heads/*:refs/remotes/origin/*

url = [email protected]:gortazar/mygithubrepo.git

[branch "master"]

remote = origin

merge = refs/heads/master

[branch "cool_feature"]

remote = origin

merge = refs/heads/cool_feature

Page 46: Taller Git en la URJC

Ramas y tags

• Obtener una rama remota $ git checkout cool_feature

Branch cool_feature set up to track remote branch

cool_feature from origin.

Switched to a new branch 'cool_feature’

Page 47: Taller Git en la URJC

Ramas y tags

• Crear un tag

Básicamente es darle nombre a un commit

Hay dos versiones Tags ligeros:sólo contienen el nombre del tag

Tags pesados: contienen además el nombre del committer y un mensaje

Page 48: Taller Git en la URJC

Ramas y tags

• Crear un tag ligero

$ git tag v1.0

$ git show v1.0

commit 6a3a19dcf6beb4ddcc0c707a6d31fd7b18cdfed5

Author: Francisco Gortazar <[email protected]>

Date: Mon Mar 17 18:03:35 2014 +0000

Added my first ruby code

...

Page 49: Taller Git en la URJC

Ramas y tags

• Crear un tag pesado $ git tag -a v1.0pesado -m "Un tag pesado"

$ git show v1.0pesado

tag v1.0pesado

Tagger: Francisco Gortazar <[email protected]>

Date: Mon Mar 17 18:30:56 2014 +0000

Un tag pesado

commit 6a3a19dcf6beb4ddcc0c707a6d31fd7b18cdfed5

Author: Francisco Gortazar <[email protected]>

Date: Mon Mar 17 18:03:35 2014 +0000

Added my first ruby code

Page 50: Taller Git en la URJC

Ramas y tags

• Mostrar la lista de tags

• Empujar los tags al repositorio remoto

$ git tag

v1.0

v1.0pesado

$ git push origin v1.0

Total 0 (delta 0), reused 0 (delta 0)

To [email protected]:gortazar/mygithubrepo.git

* [new tag] v1.0 -> v1.0

Page 51: Taller Git en la URJC

Ramas y tags

• Las ramas y los tags son referencias a commits específicos

• Hay una referencia especial que es HEAD

Page 52: Taller Git en la URJC

Ramas y tags

• Cuando hacemos checkout cambiamos el commit al que apunta HEAD

Page 53: Taller Git en la URJC

Comandos útiles

• Comandos útiles

git help <comando>

git log Información de los commits

git log -p -2 Información de lo que ha cambiado en los últimos dos

commits

git log --graph --all

git log --oneline

Page 55: Taller Git en la URJC

Comandos útiles

• Git cheatsheet

http://ndpsoftware.com/git-cheatsheet.html

Page 56: Taller Git en la URJC

@fgortazar

@micael_gallego

Git en Eclipse PATXI GORTÁZAR (@FGORTAZAR)

Page 57: Taller Git en la URJC

Git en Eclipse

• Prerequisitos

STS 3.4.0 http://www.springsource.org/downloads/sts-ggts

Escoger la opción basada en Eclipse 4.3

Incluye Egit y Maven

Page 58: Taller Git en la URJC

Git en Eclipse

• Clonar el repositorio

Eclipse Perspectiva Git repository exploring

Clone a git repository URI

[email protected]:gortazar/mygithubrepo.git

Page 59: Taller Git en la URJC

Git en Eclipse

• Crear un proyecto Java

org.filetransfer

Crear un fichero de versión en la raíz

Version.txt 0.1

Crear un fichero SFTPTransfer en el paquete org.filetransfer

Page 60: Taller Git en la URJC

Git en Eclipse

• Compartir el proyecto en git

Añadirlo al repositorio git del proyecto filetransfer Team > Share project… > Git

Repository: mygithubrepo

Page 61: Taller Git en la URJC

Git en Eclipse

• Añadir los ficheros para que Eclipse haga tracking de los mismos

Team > Add to index

Page 62: Taller Git en la URJC

Git en Eclipse

• Commit! ▫ Sobre el proyecto > Team

> Commit…

▫ El comentario es obligatorio

▫ Chequear Que el autor es el correcto

Que están marcados los ficheros adecuados

Que no está marcada la casilla “Push the changes to upstream”

Page 63: Taller Git en la URJC

Git en Eclipse

• Añadir algún método más a la clase

Hay ficheros no añadidos al staging area no se hará commit de ellos

Page 64: Taller Git en la URJC

Git en Eclipse

• Podemos añadir los ficheros manualmente ▫ Botón derecho > Team >

Add to index

• En Eclipse esto se hace automáticamente al hacer commit

Page 65: Taller Git en la URJC

Git en Eclipse

• Subir cambios al repositorio remoto (push)

En este momento el repositorio local se encuentra “a 2 commits” del repositorio remoto

Page 66: Taller Git en la URJC

Git en Eclipse

• Subir cambios al repositorio remoto (push)

Sobre el proyecto > Team > Push to upstream

Page 67: Taller Git en la URJC

Git en Eclipse

• Crear un branch para la versión

Sobre el proyecto > Team > Switch to > New branch… From: refs/heads/development

Branch name: release-0.1

Asegurarse de que checkout new branch está activado

• El código del workspace señala ahora la versión release-0.1

Hacer algún cambio

Commit

Page 68: Taller Git en la URJC

Git en Eclipse

• Cambiar en la rama develop la versión a 0.2

Sobre el proyecto > Team > Switch to > develop

Modificar el fichero version.txt

Commit

Push to upstream

Page 69: Taller Git en la URJC

Git en Eclipse

• Hacer un tag

Tag en la rama release-0.1 Team > Advanced > Tag > 0.1.0-RC1

Team > Remote > Push… > Next > Add all tags spec

Build/test/deploy…

Page 70: Taller Git en la URJC

Git en Eclipse

• Obtener cambios del repositorio remoto (pull)

Sobre el proyecto > Team > Fetch from upstream Obtiene el índice de cambios

Sobre el proyecto > Team > Pull

Page 71: Taller Git en la URJC

Git en Eclipse

• ¿Qué pasa si otro desarrollador subió cambios que entran en conflicto con los míos?

A modifica el constructor

B modifica el constructor de otra manera diferente

A y B hacen push del repositorio

El último que llega está obligado a hacer un pull y resolver los conflictos

Page 72: Taller Git en la URJC

Git en Eclipse

Page 73: Taller Git en la URJC

Git en Eclipse

• ¿Qué pasa si otro desarrollador subió cambios que entran en conflicto con los míos?

Obtener los cambios Team > Fetch from upstream

Team > Pull Los cambios se mezclan y git marca los conflictos

Page 74: Taller Git en la URJC

Git en Eclipse

• ¿Qué pasa si otro desarrollador subió cambios que entran en conflicto con los míos?

Corregir (mezclar)

Añadir la mezcla git add

git commit git push

Page 75: Taller Git en la URJC

@fgortazar

@micael_gallego

Herramientas de Gestión de Proyetos (GitHub)

MICAEL GALLEGO

Page 76: Taller Git en la URJC

Herramientas de gestión de Proyectos

• Además del repositorio de código, los desarrolladores necesitan más herramientas para gestionar su trabajo

• Existen múltiples tipos de herramientas, algunas focalizadas en un servicio concreto y otras que integran varios de ellos

• Las puedes instalar tu mismo en un servidor o usar “Software as a Service”

Page 77: Taller Git en la URJC

Herramientas de gestión de Proyectos

•Servicios

Gestión de proyectos: Tareas, documentación, comunicación, …

Aspectos técnicos: Análisis de código, ejecución de test, entornos de preproducción, …

http://en.wikipedia.org/wiki/Comparison_of_project_management_software

Page 78: Taller Git en la URJC

Herramientas de gestión de Proyectos

•Gestión de tareas

Sirven para gestionar “las cosas que hay que hacer” (Issues)

Tipos: Bugs (que arreglar)

Funcionalidades (que implementar)

Tareas (instalar un servidor)

Campos: Título, responsable, estado (nueva, en progreso, etc…)

Page 79: Taller Git en la URJC

Gestión de tareas

Page 80: Taller Git en la URJC

Gestión de tareas

Page 81: Taller Git en la URJC

Herramientas de gestión de Proyectos

•Documentación compartida

MediaWiki, Google Drive, Confluence

Edición colaborativa (todos participan)

Edición web (en cualquier momento)

Versionado (para que no haya miedo en meter la pata)

Page 82: Taller Git en la URJC

Forjas

• Las forjas son servicios más o menos integrados que ayudan en el proceso de desarrollo

• Cada forja concreta dispone de más o menos servicios

http://en.wikipedia.org/wiki/Comparison_of_open_source_software_hosting_facilities

Page 83: Taller Git en la URJC

Tickets

Wiki

Downloads management

GoogleCode FORJAS

Page 84: Taller Git en la URJC

SourceForge

Page 85: Taller Git en la URJC

Redmine

• Project management tool with support for: Multiple projects Tickets Wiki Files (downloads) Documents Forums Repository browser Calendar Gantt charts News Public/private projects

Page 86: Taller Git en la URJC

Redmine

Page 87: Taller Git en la URJC

GitHub

• Software as a Service

• Public (free) and private (paid) projects

• Wiki

• Tickets

• Release publication

• Web page

• Git repository

• Social network for developers

Page 88: Taller Git en la URJC

Tickets

Wiki

Code

GitHub

Page 89: Taller Git en la URJC

GitHub - Issues

• Los issues sirven para gestionar las tareas, o los errores (que resolver) o las funcionalidades (que implementar)

• Algunos sistemas permiten crear “tipos” de issues para categorizarlos

• Vamos a crear un issue

• Nos pondremos como responsables

Page 90: Taller Git en la URJC
Page 91: Taller Git en la URJC
Page 92: Taller Git en la URJC
Page 93: Taller Git en la URJC

GitHub - Issues

• Abre el proyecto de un compañero y pon un comentario en el nuevo issue

• Se le enviará un mail cuando alguien comente en un issue que tiene asignado

• Pon un comentario en respuesta al comentario del compañero y cierra el issue

Page 94: Taller Git en la URJC
Page 95: Taller Git en la URJC

GitHub - Issues

• Se pueden asignar etiquetas a los issues para categorizalos

• Los “tipos de etiquetas” se crean en la página principal

• Vamos a crear dos tipos de etiquetas:

Roja: Para interfaz de usuario

Negra: Para servicios de backend

• Creamos un issue y le asignamos alguna etiqueta

Page 96: Taller Git en la URJC
Page 97: Taller Git en la URJC

GitHub - Issues

• Se pueden asignar issues a “milestones”

Los milestones son puntos en el desarrollo

Se puede asociar un milestone a cada iteración en la metodología de desarrollo

• Vamos a crear un milestone

Nombre: Sprint 1

Descripción y fecha: Cómo quieras

Asignar los issues anteriores a este milestone

Page 98: Taller Git en la URJC
Page 99: Taller Git en la URJC
Page 100: Taller Git en la URJC
Page 101: Taller Git en la URJC

GitHub - Wiki

• GitHub permite editar wikis desde la web

• Además, los ficheros de código fuente en formato wiki se visualizan como documentos en la web

• Si el fichero se llama README.md y está en la raíz del proyecto, se usa como descripción del mismo

Page 102: Taller Git en la URJC

GitHub - Wiki

Page 103: Taller Git en la URJC

GitHub - Wiki

Page 104: Taller Git en la URJC

GitHub - Wiki

Page 105: Taller Git en la URJC

GitHub - Wiki

Page 106: Taller Git en la URJC

GitHub - Eclipse

• Eclipse tiene varios plugins para mejorar la integración con varias forjas

• GitHub tiene algunos plugins específicos

Page 107: Taller Git en la URJC

GitHub - Eclipse

• Mylyn

Plugin para gestionar tareas en Eclipse

Editor de issues

Interfaz centrado en tareas

Page 108: Taller Git en la URJC

GitHub - Eclipse

• GitHub Mylyn Connector

Es necesario instalar un plugin al plugin para conectarse a GitHub

Page 109: Taller Git en la URJC
Page 110: Taller Git en la URJC

GitHub - Eclipse

• Interfaz basado en tareas

En IDE sabe en qué tarea estás trabajando, y cuando haces commit, te pone el enlace a la tarea (para que puedas consultar info)

Page 111: Taller Git en la URJC

GitHub - Eclipse

• Eclipse tiene un plugin para editar documentos en formato wiki

• El plugin se llama “Github flavored Markdown viewer”

Page 112: Taller Git en la URJC

GitHub - Eclipse

Page 113: Taller Git en la URJC

@fgortazar

@micael_gallego

Gracias!!!

PATXI GORTÁZAR

MICAEL GALLEGO