Your SlideShare is downloading. ×

Git y drupal

781

Published on

Charla sobre Git y Drupal en la Drupalcamp Spain 2012. http://2012.drupalcamp.es/es/sesiones/git-y-drupal-91 https://vimeo.com/55596907

Charla sobre Git y Drupal en la Drupalcamp Spain 2012. http://2012.drupalcamp.es/es/sesiones/git-y-drupal-91 https://vimeo.com/55596907

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
781
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Git y DrupalDrupalcamp Spain 2012, Madrid Juan Pablo Novillo Requena (juampy)
  • 2. Acerca de mí● Drupal developer en● Módulos Twitter, OAuth y Devel (juampy en Drupal.org)● Autor de Drush Users Guide #drushguide
  • 3. Introducción
  • 4. Gestión de ramas1. Modelo simple con una rama master y ramastemporales para sprints/casos. proyecto-a sprint-1 ticket-#230master 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0
  • 5. Gestión de ramas (2) Git flow ● 2 ramas fijas. ● Feature, release, y hot-fixes.http://nvie.com/posts/a-successful-git-branching-model/
  • 6. Diferencias entre ramas (log y diff)log y diff se pueden utilizar de la misma forma:git log|diff [desde][..hasta] [-- path]Ejemplos:● git log master..2.5● git diff master..dev● git log dev..HEAD -- sites/all/modules/custom
  • 7. Localizar un bug (git bisect) HEAD 1. git bisect start HEAD HEAD~10 2. git bisect bad 3. git bisect good
  • 8. Ver el autor de una línea (git blame)● Muestra el último commit que modificó cada línea de un archivo$ git blamesites/all/modules/contrib/views/views.module28161496 (Daniel Wehner 2011-05-28 14:25:16 +0200 20) * Implements hook_forms().$ git show 28161496 #769322 by bojanz: Allow views to be...http://drupal.org/node/769322
  • 9. Modificar commits antes del pushgit rebase -i HEAD~3Permite:● Editar un commit.● Eliminar commits.● Juntar varios commits en uno.● Ejecutar un comando entre commits.
  • 10. Si haces git rebase -i de commitspusheados... http://stuffpoint.com/happy-tree-friends/image/99668-happy-tree-friends-booom.jpg
  • 11. Crear un parche (método sencillo)$ cd sites/all/modules/contrib$ git clone --recursive --branch 7.x-3.x http://git.drupal.org/project/views.git$ cd views[haz tus cambios]$ git diff > [description]-[issue-number]- [comment-number].patch
  • 12. Crear un parche (método avanzado)$ git clone --recursive --branch 7.x-3.x http://git.drupal.org/project/views.git$ cd views[haz tus cambios]$ git commit -A -m "Issue #XXXXX by Y,Z: Título"$ git format-patch origin/7.x-3.x --stdout > [project_name]-[short-description]-[issue-number]- [comment-number].patch
  • 13. EjemplosCon git format-patchhttp://drupal.org/files/pathauto_entity-bulk-update-support-1407176-1.patchCon git diffhttp://drupal.org/files/views_slideshow_1499552-03.patch
  • 14. Aplicar un parche$ wget [URL del parche][revisar los paths dentro del parche]$ git apply -v [parche][verificar los cambios]$ git commit -A -m "Aplicado parche de http://..."
  • 15. Preguntas● @juampy72● linkedin.com/in/juampy● http://drupal.org/user/682736 (juampy)

×