SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Nivel Samurai
¡Hola!
• Sergio Gómez
• Software Architect at
• @pulsarin
• linkedin.com/in/bedeveloper
Contenido
• Básicos Git
• Re-escribiendo la historia
• Workflows
• La comunidad OpenSource
• Hacks
¿De qué va esto?
¿De qué va esto?
Básicos Git
Básicos Git
• Configúralo
• Type less, be quicker
• User & passwd?
• Automatiza
~/.gitconfig
[user]
name = Sergio Gomez
email = sgomez@stratio.com
[core]
editor = vim
[push]
default = simple
alias
ci = commit -v
st = status
co = checkout
br = branch
unstage = reset HEAD --
last = log -1 HEAD
bitch = push --no-verify
alias
ci = commit -v
st = status
co = checkout
br = branch
unstage = reset HEAD --
last = log -1 HEAD
bitch = push --no-verify
alias
lgb = log --graph 
--pretty=format:'%Cred%h%Creset 
-%C(yellow)%d%Creset %s %Cgreen(%cr) 
%C(bold blue)<%an>%Creset%n' 
--abbrev-commit 
--date=relative 
--branches
alias
ssh & public key
• ¿Contraseña en cada operación?
• Múltiples usuarios
• Entre repositorios
• En el mismo repositorio
~/.ssh/config
Automatiza
• rebase
• borrado de ramas
Re-escribiendo la historia
Re-escribiendo la historia
•git commit --amend
•git rebase -i $ref
•git cherry-pick $ref
•git push -f
Re-escribiendo la historia
Re-escribiendo la historia
Re-escribiendo la historia
Re-escribiendo la historia
Re-escribiendo la historia
Workflows
Workflows
• Centralizado
• Funcionalidad por rama
• Gitflow
• Forking
Centralizado
• Mismo remoto para todos
• Muchos conflictos
• Poco versátil
• Es el más sencillo
Rama por funcionalidad
• Pueden trabajar equipos en paralelo
• Master siempre estable
• Puedes decidir cuándo integras
• Conflictos puntuales, pero más grandes
• Proyectos relativamente pequeños
Gitflow
• Estructura predefinida
• Funciona bien en proyectos grandes
• Separa cada rol específico en ramas
• Máxima estabilidad
Gitflow
Forking
• Remoto por usuario
• Tu repo, tus normas
• Integraciones sin compartir repositorio
• Permite colaboraciones externas
OpenSource
Trabajando con la comunidad
• Forking y pull request
• Explícate
• Sé concienzudo
• Sé humilde, no es personal
“Hacks”
Usa hooks
• Automatiza
• Validaciones previas
• Acciones pre-push
• Notificaciones
• …
Plantillas Pull Request
• Github las soporta, Bitbucket en proceso
• Esqueleto con la info mínima
• Estandariza la interacción con el
repositorio
Ignores temporales
• git update-index --assume-unchanged <file>
• git update-index --no-assume-unchanged <file>
Comandos interesantes
• git reflog
• git prune
• git stash
• git bisect
• git filter-branch
• git submodule
¿Usas varios equipos?
• Dropbox :)
¿Dudas?
people@stratio.com
WE ARE HIRING
@StratioBD
¡Gracias!
@pulsarin
Git nivel samurai

Weitere ähnliche Inhalte

Andere mochten auch

SmartConnex Presentation
SmartConnex PresentationSmartConnex Presentation
SmartConnex Presentation
Fatima Abi
 

Andere mochten auch (17)

'Hoe maak jij het verschil voor personeel?' voor Secretaressegroeidag 2013
'Hoe maak jij het verschil voor personeel?' voor Secretaressegroeidag 2013'Hoe maak jij het verschil voor personeel?' voor Secretaressegroeidag 2013
'Hoe maak jij het verschil voor personeel?' voor Secretaressegroeidag 2013
 
Magnus Piirits. Eesti pensionisüsteemi reformide põlvkondadevaheliste efektid...
Magnus Piirits. Eesti pensionisüsteemi reformide põlvkondadevaheliste efektid...Magnus Piirits. Eesti pensionisüsteemi reformide põlvkondadevaheliste efektid...
Magnus Piirits. Eesti pensionisüsteemi reformide põlvkondadevaheliste efektid...
 
U11 T3 Brooke Marshall
U11 T3 Brooke MarshallU11 T3 Brooke Marshall
U11 T3 Brooke Marshall
 
Sistem Pemasaran (PTI)
Sistem Pemasaran (PTI)Sistem Pemasaran (PTI)
Sistem Pemasaran (PTI)
 
Performance profiling log
Performance profiling log Performance profiling log
Performance profiling log
 
Best bacon thanksgiving dishes by nicmaxx ecigs
Best bacon thanksgiving dishes by nicmaxx ecigsBest bacon thanksgiving dishes by nicmaxx ecigs
Best bacon thanksgiving dishes by nicmaxx ecigs
 
vicente
vicentevicente
vicente
 
Mis gustos
Mis gustosMis gustos
Mis gustos
 
Shared parental leave webcast
Shared parental leave webcastShared parental leave webcast
Shared parental leave webcast
 
EML Brochure
EML BrochureEML Brochure
EML Brochure
 
Research project
Research projectResearch project
Research project
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
SmartConnex Presentation
SmartConnex PresentationSmartConnex Presentation
SmartConnex Presentation
 
Interactive Infographic - HR Planner 2016
Interactive Infographic - HR Planner 2016Interactive Infographic - HR Planner 2016
Interactive Infographic - HR Planner 2016
 
Fabiana ilarraz 2016
Fabiana ilarraz 2016Fabiana ilarraz 2016
Fabiana ilarraz 2016
 
Care designpwpt.net
Care designpwpt.netCare designpwpt.net
Care designpwpt.net
 
Ideas advertising campaign
Ideas advertising campaign Ideas advertising campaign
Ideas advertising campaign
 

Ähnlich wie Git nivel samurai

05 intro-git-github-heroku-v4
05 intro-git-github-heroku-v405 intro-git-github-heroku-v4
05 intro-git-github-heroku-v4
fyomaira
 

Ähnlich wie Git nivel samurai (20)

Git with Scrum en español
Git with Scrum en españolGit with Scrum en español
Git with Scrum en español
 
Drupal workflow
Drupal workflowDrupal workflow
Drupal workflow
 
Control de versiones utilizando Git
Control de versiones utilizando GitControl de versiones utilizando Git
Control de versiones utilizando Git
 
Todo sobre el mundo del GIT-INTEGRACION-CONCEPTOS-USABILIDAD
Todo sobre el mundo del GIT-INTEGRACION-CONCEPTOS-USABILIDADTodo sobre el mundo del GIT-INTEGRACION-CONCEPTOS-USABILIDAD
Todo sobre el mundo del GIT-INTEGRACION-CONCEPTOS-USABILIDAD
 
Git 101+
Git 101+Git 101+
Git 101+
 
Flujos de trabajo para un desarrollador web frontend
Flujos de trabajo para un desarrollador web frontendFlujos de trabajo para un desarrollador web frontend
Flujos de trabajo para un desarrollador web frontend
 
05 intro-git-github-heroku-v4
05 intro-git-github-heroku-v405 intro-git-github-heroku-v4
05 intro-git-github-heroku-v4
 
Taller Git en la URJC
Taller Git en la URJC Taller Git en la URJC
Taller Git en la URJC
 
Mejora tu productividad con git
Mejora tu productividad con gitMejora tu productividad con git
Mejora tu productividad con git
 
Git with gifs
Git with gifsGit with gifs
Git with gifs
 
The Gift of Git [Español: La Palabra de Git]
The Gift of Git [Español: La Palabra de Git]The Gift of Git [Español: La Palabra de Git]
The Gift of Git [Español: La Palabra de Git]
 
ES.ASW.PL01_Github_2021.pdf
ES.ASW.PL01_Github_2021.pdfES.ASW.PL01_Github_2021.pdf
ES.ASW.PL01_Github_2021.pdf
 
Curso: Publicando mi proyecto web en Github
Curso: Publicando mi proyecto web en GithubCurso: Publicando mi proyecto web en Github
Curso: Publicando mi proyecto web en Github
 
Git + Github - Sysmana 2014
Git + Github - Sysmana 2014Git + Github - Sysmana 2014
Git + Github - Sysmana 2014
 
Git y Github basico.pptx
Git y Github basico.pptxGit y Github basico.pptx
Git y Github basico.pptx
 
Replacing SVN with Git for managers
Replacing SVN with Git for managersReplacing SVN with Git for managers
Replacing SVN with Git for managers
 
Git windows
Git windowsGit windows
Git windows
 
Flujos de trabajo y mejores prácticas en git
Flujos de trabajo y mejores prácticas en gitFlujos de trabajo y mejores prácticas en git
Flujos de trabajo y mejores prácticas en git
 
Serling dev team, development process
Serling dev team, development processSerling dev team, development process
Serling dev team, development process
 
Git: flujos de trabajo y herramientas para trabajo colaborativo
Git: flujos de trabajo y herramientas para trabajo colaborativoGit: flujos de trabajo y herramientas para trabajo colaborativo
Git: flujos de trabajo y herramientas para trabajo colaborativo
 

Git nivel samurai

Hinweis der Redaktion

  1. No deben ver el código de la PR. Las revisiones deben tomarse como para aprender. De las PR se aprende, doble +1
  2. VS gitignore: evitas que se suba tu ignore al repo