SlideShare a Scribd company logo
whoami



        Rafa García

      Web developer
Administrador de Sistemas
Entusiasta del software libre
¡Encuesta rápida!
●
    ¿Quién NO está usando un SCM?
¡Encuesta rápida!
●
    ¿Quién NO está usando un SCM?
●
    ¿Subversion?
¡Encuesta rápida!
●
    ¿Quién NO está usando un SCM?
●
    ¿Subversion?
●
    ¿CVS? (¿todavía?)
¡Encuesta rápida!
●
    ¿Quién NO está usando un SCM?
●
    ¿Subversion?
●
    ¿CVS? (¿todavía?)
C'est la vie




Le Voyage Magnifique es obra de Debra Chow - http://vimeo.com/6846068
¿Qué es Git?
¿Qué es Git?




 Git sistema de control de versiones
      distribuido, open source,
diseñado para ser rápido y eficiente.
¿Por qué Git?
●
    Distribuido
●
    ¡Es muy rápido!
●
    Branching
●
    Workflows
●
    Una gran comunidad detrás
Configurar Git




By Twicepix - http://www.flickr.com/photos/twicepix/4288056667/
Configurar Git
$ git config --global user.name "Rafa G."
$ git config --global user.email "foo@domain.com"


# Extraball
$ git config --global color.ui auto
$ git config --global core.editor /usr/bin/vim
Crear repositorio
$ mkdir foo
$ cd foo/
~/foo$ git init
Initialized empty Git repository in ~/foo/.git/
Trabajando con Git
Estado del repositorio
$ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use
"git add" to track)
Estado del repositorio
$ touch README
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# README
nothing added to commit but untracked files present (use "git
add" to track)
Stage
$ git add README
Stage
$ git add README
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
# new file:    README
#
Commit
$ git commit -m 'First commit. Adelante
caminante!'
[master (root-commit) e3e4e54] First
commit. Adelante caminante!
 0 files changed, 0 insertions(+), 0
deletions(-)
create mode 100644 README
Ignorar ficheros
$ cat .gitignore
.bundle/
db/sphinx/*
log/**/*
log/*
tmp/**/*
tmp/*
.rvmrc
Deshaciendo cambios




    By Gaelx - http://www.flickr.com/photos/gaelx/2664672458/
Deshaciendo cambios
$ echo "Loadin$%&... Git" > README
$ git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified:    README
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git checkout README
$ git status
# On branch master
nothing to commit (working directory clean)
Deshaciendo cambios
$ echo "A not useful text" > README
$ git add .
$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
# modified:    README
#
$ git reset HEAD README
Deshaciendo cambios
$ echo "Yeeeeeeeha" > README
$ git add .
$ git commit -m 'Upss this is FAIL'
$ git revert HEAD
Finished one revert.
[detached HEAD 19c6cb5] Revert "Upss this
is FAIL"
 1 files changed, 1 insertions(+), 1
deletions(-)
Deshaciendo cambios




    By Stan Lee
Deshaciendo cambios
$ git reset --hard HEAD^^^
# Que es lo mismo que...
$ git reset --hard HEAD~3
Deshaciendo cambios
$ git reset --hard HEAD^^^
# Que es lo mismo que...
$ git reset --hard HEAD~3


# O una versión mas light
$ git reset --soft HEAD^
Branch




By n8agrin - http://www.flickr.com/photos/n8agrin/2735063012/
Branch
# Creamos la rama
$ git branch loading
$ git checkout loading
Switched to branch 'loading'


# Extraball
$ git checkout -b loading
Switched to a new branch 'loading'
Branch
# Moverse por las ramas
$ git branch loading
$ git branch riojaparty
$ git checkout loading
Switched to branch 'loading'
$ git checkout riojaparty
Switched to branch 'riojaparty'
$ git checkout master
Switched to branch 'master'


# Extraball – Listado de ramas (man git-branch)
$ git branch
 loading
* master
 riojaparty
Branch
# Merge de ramas
$ git checkout riojaparty
# Commit some changes!
$ git checkout master
$ git merge riojaparty
Updating 6f190b0..a6e1f75
Fast-forward
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 riojaparty_talks.txt
Branch
$ git branch remove_me
$ git branch -d remove_me
Deleted branch remove_me (was a6e1f75).


# Extraball
# Borrar rama con cambios no "mergeados"
(man git-branch)
$ git branch -D remove_me
Tag
# Creando tags
$ git tag v1.0
$ git tag
v1.0
$ git tag beta1 HEAD^
$ git tag
beta1
v1.0
$ git tag beta2 HEAD~5
$ git tag
beta1
beta2
V1.0


# Borrando tags
$ git tag -d beta2
Deleted tag 'beta2' (was f379043)
Trabajando en equipo




     By Steve Punter - http://www.flickr.com/photos/spunter/2947192314
Trabajando en equipo
# Clonando un repositorio
$ git clone foo foo_clone
Initialized empty Git repository in ~/foo_clone/.git/
$ cd foo_clone
$ git remote
origin
$ git remote show origin
* remote origin
 Fetch URL: ~/foo
 Push URL: ~/foo
 HEAD branch (remote HEAD is ambiguous, may be one of the following):
  master
  riojaparty
 Remote branches:
  loading      tracked
  master       tracked
  riojaparty tracked
 Local branch configured for 'git pull':
  master merges with remote master
 Local ref configured for 'git push':
  master pushes to master (up to date)
Trabajando en equipo
$ git clone --bare foo foo.git
Initialized empty Git repository in ~/foo.git/


$ ls foo.git/
branches config description HEAD hooks
info objects packed-refs refs
Trabajando en equipo
# Enviando cambios al repositorio remoto
$ git clone foo.git foo_bare
# Realizamos cambios...
$ git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 250 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
To ~/foo.git
  c2d55e3..012f07d master -> master
Trabajando en equipo
# Actualizando nuestra copia local...
$ git pull
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
From ~/foo
  a6e1f75..83a30a8 master       -> origin/master
Updating a6e1f75..83a30a8
Fast-forward
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 add_another_file.txt
Trabajando en equipo
# Enviando cambios a un repositorio remoto concreto
# Hacemos algunos cambios y entonces...
$ git push origin master
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 265 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
To ../foo.git
  012f07d..0a5d1cd master -> master
Conflictos




By NWharry - http://www.flickr.com/photos/nightwing_26/5151831220/
Extras
●
    Stash
●
    Blame
●
    Bisect
●
    Ramas y tags remotos
●
    Workflows
●
    …
¡Gracias!




By woodleywonderworks - http://www.flickr.com/photos/wwworks/4759535950/
Enlaces
Git - http://git-scm.com/


Tutoriales y libros:
Git Immersion - http://gitimmersion.com/
Pro Git (Scott Chacon) - http://www.humbug.in/docs/pro-git-book-es/
Pragmatic Guide To Git - http://pragprog.com/titles/pg_git/pragmatic-guide-to-git


Pensamientos:
Joel on Software - http://www.joelonsoftware.com/items/2010/03/17.html


Presentaciones:
Git 101 - http://www.slideshare.net/chacon/git-101-presentation
The everyday developer's guide to version control with Git -
http://www.slideshare.net/erincarter/the-everyday-developers-guide-to-version-control-with-git
Git - http://www.slideshare.net/jnewland/git-512895
Git Started With Git - http://www.slideshare.net/qrush/git-started-with-git
Loading...git

More Related Content

What's hot

Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
Ariejan de Vroom
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
DivineOmega
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
Prakash Dantuluri
 
Get going with_git_ppt
Get going with_git_pptGet going with_git_ppt
Get going with_git_ppt
Miraz Al-Mamun
 
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
tmacwilliam
 
Git Real
Git RealGit Real
Git Real
Gong Haibing
 
Git advanced
Git advancedGit advanced
Git advanced
Peter Vandenabeele
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
SeongJae Park
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Brian K. Vagnini
 
Version Control with Git for Beginners
Version Control with Git for BeginnersVersion Control with Git for Beginners
Version Control with Git for Beginners
bryanbibat
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
Becky Todd
 
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Codemotion
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messes
Katie Sylor-Miller
 
slides.pdf
slides.pdfslides.pdf
slides.pdfvidsvagi
 
Eat my data
Eat my dataEat my data
Eat my dataPeng Zuo
 
Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductortimyates
 

What's hot (19)

Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 
Get going with_git_ppt
Get going with_git_pptGet going with_git_ppt
Get going with_git_ppt
 
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
 
Git Real
Git RealGit Real
Git Real
 
Git advanced
Git advancedGit advanced
Git advanced
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
 
Gittalk
GittalkGittalk
Gittalk
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
 
Version Control with Git for Beginners
Version Control with Git for BeginnersVersion Control with Git for Beginners
Version Control with Git for Beginners
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
 
Now i git it!!!
Now i git it!!!Now i git it!!!
Now i git it!!!
 
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messes
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Eat my data
Eat my dataEat my data
Eat my data
 
Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductor
 

Viewers also liked

Drupal
DrupalDrupal
Drupal
Hari K T
 
Pedro Acevedo
Pedro AcevedoPedro Acevedo
Pedro Acevedo
pedromartinacevedo
 
máy cắt tôn - máy chấn tôn - máy cắt rập giấy carton
máy cắt tôn - máy chấn tôn - máy cắt rập giấy cartonmáy cắt tôn - máy chấn tôn - máy cắt rập giấy carton
máy cắt tôn - máy chấn tôn - máy cắt rập giấy cartontranduyen76
 
¿Como fomentar y seleccionar estrategia locales de calidad?
¿Como fomentar y seleccionar estrategia locales de calidad?¿Como fomentar y seleccionar estrategia locales de calidad?
¿Como fomentar y seleccionar estrategia locales de calidad?Carlos Romero Valiente
 
06 vo cam 2007
06 vo cam 200706 vo cam 2007
06 vo cam 2007Hùng Lê
 
Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4
Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4
Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4Robert Bliss
 
Willem's PowerPoint
Willem's PowerPoint Willem's PowerPoint
Willem's PowerPoint
lcs56
 
Le due anfore
Le due anforeLe due anfore
Le due anfore
angelamericibs
 
Comunicados processo seletivo Ibiúna
Comunicados processo seletivo IbiúnaComunicados processo seletivo Ibiúna
Comunicados processo seletivo Ibiúna
Luana Maria Ferreira Fernandes
 
04 NETCOM G5 - COL Matchette
04 NETCOM G5 - COL Matchette04 NETCOM G5 - COL Matchette
04 NETCOM G5 - COL Matchette
USARMYNETCOM
 
Ldp leadership development - eng
Ldp   leadership development - engLdp   leadership development - eng
Ldp leadership development - engMây Trắng
 
Luis Machín
Luis MachínLuis Machín
Luis Machín
javilafuente
 
Salute e ambiente lettera al sindaco di miane
Salute e ambiente   lettera al sindaco di mianeSalute e ambiente   lettera al sindaco di miane
Salute e ambiente lettera al sindaco di mianeRoberto de Noni
 
Khoa học và Sức khỏe trẻ em
Khoa học và Sức khỏe trẻ emKhoa học và Sức khỏe trẻ em
Khoa học và Sức khỏe trẻ em
TS DUOC
 
The Oral Side Of Sjögren Syndrome
The  Oral  Side Of  Sjögren  SyndromeThe  Oral  Side Of  Sjögren  Syndrome
The Oral Side Of Sjögren Syndrome
andreamrblog
 

Viewers also liked (17)

Drupal
DrupalDrupal
Drupal
 
Pedro Acevedo
Pedro AcevedoPedro Acevedo
Pedro Acevedo
 
máy cắt tôn - máy chấn tôn - máy cắt rập giấy carton
máy cắt tôn - máy chấn tôn - máy cắt rập giấy cartonmáy cắt tôn - máy chấn tôn - máy cắt rập giấy carton
máy cắt tôn - máy chấn tôn - máy cắt rập giấy carton
 
¿Como fomentar y seleccionar estrategia locales de calidad?
¿Como fomentar y seleccionar estrategia locales de calidad?¿Como fomentar y seleccionar estrategia locales de calidad?
¿Como fomentar y seleccionar estrategia locales de calidad?
 
06 vo cam 2007
06 vo cam 200706 vo cam 2007
06 vo cam 2007
 
Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4
Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4
Mar 30, 08 Am Giving That Pleases Jesus Lk 21.1 4
 
Willem's PowerPoint
Willem's PowerPoint Willem's PowerPoint
Willem's PowerPoint
 
Saopaulo
SaopauloSaopaulo
Saopaulo
 
Le due anfore
Le due anforeLe due anfore
Le due anfore
 
Comunicados processo seletivo Ibiúna
Comunicados processo seletivo IbiúnaComunicados processo seletivo Ibiúna
Comunicados processo seletivo Ibiúna
 
04 NETCOM G5 - COL Matchette
04 NETCOM G5 - COL Matchette04 NETCOM G5 - COL Matchette
04 NETCOM G5 - COL Matchette
 
Ldp leadership development - eng
Ldp   leadership development - engLdp   leadership development - eng
Ldp leadership development - eng
 
Luis Machín
Luis MachínLuis Machín
Luis Machín
 
Stands
StandsStands
Stands
 
Salute e ambiente lettera al sindaco di miane
Salute e ambiente   lettera al sindaco di mianeSalute e ambiente   lettera al sindaco di miane
Salute e ambiente lettera al sindaco di miane
 
Khoa học và Sức khỏe trẻ em
Khoa học và Sức khỏe trẻ emKhoa học và Sức khỏe trẻ em
Khoa học và Sức khỏe trẻ em
 
The Oral Side Of Sjögren Syndrome
The  Oral  Side Of  Sjögren  SyndromeThe  Oral  Side Of  Sjögren  Syndrome
The Oral Side Of Sjögren Syndrome
 

Similar to Loading...git

Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
Nick Quaranto
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control SystemVictor Wong
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
bryanbibat
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
Alberto Leal
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
Ignacio Martín
 
Git & gitflow
Git & gitflowGit & gitflow
Git & gitflow
Nolifelover Earn
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Jedi Mind Tricks in Git
Jedi Mind Tricks in GitJedi Mind Tricks in Git
Jedi Mind Tricks in Git
Johan Abildskov
 
Jedi Mind Tricks for Git
Jedi Mind Tricks for GitJedi Mind Tricks for Git
Jedi Mind Tricks for Git
Jan Krag
 
Git basics
Git basicsGit basics
Git basics
Amit Sawhney
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
themystic_ca
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Git walkthrough
Git walkthroughGit walkthrough
Git walkthrough
Mahmoud Said
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
Khanh NL-bantoilatoi
 
Git
GitGit

Similar to Loading...git (20)

Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
Git & gitflow
Git & gitflowGit & gitflow
Git & gitflow
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Jedi Mind Tricks in Git
Jedi Mind Tricks in GitJedi Mind Tricks in Git
Jedi Mind Tricks in Git
 
Jedi Mind Tricks for Git
Jedi Mind Tricks for GitJedi Mind Tricks for Git
Jedi Mind Tricks for Git
 
Git basics
Git basicsGit basics
Git basics
 
Git github
Git githubGit github
Git github
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Git walkthrough
Git walkthroughGit walkthrough
Git walkthrough
 
How to use git without rage
How to use git without rageHow to use git without rage
How to use git without rage
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
 
Git
GitGit
Git
 

More from Rafael García

¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
¿Por qué Ruby? Descubre su expresividad (y peculiaridades)¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
Rafael García
 
Quiero ser informatico, ¿que hago?
Quiero ser informatico, ¿que hago?Quiero ser informatico, ¿que hago?
Quiero ser informatico, ¿que hago?Rafael García
 
Jugando con gosu
Jugando con gosuJugando con gosu
Jugando con gosu
Rafael García
 
Loading... Ruby on Rails 3
Loading... Ruby on Rails 3Loading... Ruby on Rails 3
Loading... Ruby on Rails 3
Rafael García
 
Un Trocito De Google
Un Trocito De GoogleUn Trocito De Google
Un Trocito De Google
Rafael García
 
Taller de Capistrano
Taller de CapistranoTaller de Capistrano
Taller de Capistrano
Rafael García
 
A Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on RailsA Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on Rails
Rafael García
 

More from Rafael García (7)

¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
¿Por qué Ruby? Descubre su expresividad (y peculiaridades)¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
 
Quiero ser informatico, ¿que hago?
Quiero ser informatico, ¿que hago?Quiero ser informatico, ¿que hago?
Quiero ser informatico, ¿que hago?
 
Jugando con gosu
Jugando con gosuJugando con gosu
Jugando con gosu
 
Loading... Ruby on Rails 3
Loading... Ruby on Rails 3Loading... Ruby on Rails 3
Loading... Ruby on Rails 3
 
Un Trocito De Google
Un Trocito De GoogleUn Trocito De Google
Un Trocito De Google
 
Taller de Capistrano
Taller de CapistranoTaller de Capistrano
Taller de Capistrano
 
A Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on RailsA Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on Rails
 

Recently uploaded

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

Loading...git

  • 1.
  • 2. whoami Rafa García Web developer Administrador de Sistemas Entusiasta del software libre
  • 3. ¡Encuesta rápida! ● ¿Quién NO está usando un SCM?
  • 4. ¡Encuesta rápida! ● ¿Quién NO está usando un SCM? ● ¿Subversion?
  • 5. ¡Encuesta rápida! ● ¿Quién NO está usando un SCM? ● ¿Subversion? ● ¿CVS? (¿todavía?)
  • 6. ¡Encuesta rápida! ● ¿Quién NO está usando un SCM? ● ¿Subversion? ● ¿CVS? (¿todavía?)
  • 7. C'est la vie Le Voyage Magnifique es obra de Debra Chow - http://vimeo.com/6846068
  • 9. ¿Qué es Git? Git sistema de control de versiones distribuido, open source, diseñado para ser rápido y eficiente.
  • 10. ¿Por qué Git? ● Distribuido ● ¡Es muy rápido! ● Branching ● Workflows ● Una gran comunidad detrás
  • 11. Configurar Git By Twicepix - http://www.flickr.com/photos/twicepix/4288056667/
  • 12. Configurar Git $ git config --global user.name "Rafa G." $ git config --global user.email "foo@domain.com" # Extraball $ git config --global color.ui auto $ git config --global core.editor /usr/bin/vim
  • 13. Crear repositorio $ mkdir foo $ cd foo/ ~/foo$ git init Initialized empty Git repository in ~/foo/.git/
  • 15. Estado del repositorio $ git status # On branch master # # Initial commit # nothing to commit (create/copy files and use "git add" to track)
  • 16. Estado del repositorio $ touch README $ git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # README nothing added to commit but untracked files present (use "git add" to track)
  • 17. Stage $ git add README
  • 18. Stage $ git add README $ git status # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: README #
  • 19. Commit $ git commit -m 'First commit. Adelante caminante!' [master (root-commit) e3e4e54] First commit. Adelante caminante! 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 README
  • 20. Ignorar ficheros $ cat .gitignore .bundle/ db/sphinx/* log/**/* log/* tmp/**/* tmp/* .rvmrc
  • 21. Deshaciendo cambios By Gaelx - http://www.flickr.com/photos/gaelx/2664672458/
  • 22. Deshaciendo cambios $ echo "Loadin$%&... Git" > README $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: README # no changes added to commit (use "git add" and/or "git commit -a") $ git checkout README $ git status # On branch master nothing to commit (working directory clean)
  • 23. Deshaciendo cambios $ echo "A not useful text" > README $ git add . $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: README # $ git reset HEAD README
  • 24. Deshaciendo cambios $ echo "Yeeeeeeeha" > README $ git add . $ git commit -m 'Upss this is FAIL' $ git revert HEAD Finished one revert. [detached HEAD 19c6cb5] Revert "Upss this is FAIL" 1 files changed, 1 insertions(+), 1 deletions(-)
  • 25. Deshaciendo cambios By Stan Lee
  • 26. Deshaciendo cambios $ git reset --hard HEAD^^^ # Que es lo mismo que... $ git reset --hard HEAD~3
  • 27. Deshaciendo cambios $ git reset --hard HEAD^^^ # Que es lo mismo que... $ git reset --hard HEAD~3 # O una versión mas light $ git reset --soft HEAD^
  • 28. Branch By n8agrin - http://www.flickr.com/photos/n8agrin/2735063012/
  • 29. Branch # Creamos la rama $ git branch loading $ git checkout loading Switched to branch 'loading' # Extraball $ git checkout -b loading Switched to a new branch 'loading'
  • 30. Branch # Moverse por las ramas $ git branch loading $ git branch riojaparty $ git checkout loading Switched to branch 'loading' $ git checkout riojaparty Switched to branch 'riojaparty' $ git checkout master Switched to branch 'master' # Extraball – Listado de ramas (man git-branch) $ git branch loading * master riojaparty
  • 31. Branch # Merge de ramas $ git checkout riojaparty # Commit some changes! $ git checkout master $ git merge riojaparty Updating 6f190b0..a6e1f75 Fast-forward 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 riojaparty_talks.txt
  • 32. Branch $ git branch remove_me $ git branch -d remove_me Deleted branch remove_me (was a6e1f75). # Extraball # Borrar rama con cambios no "mergeados" (man git-branch) $ git branch -D remove_me
  • 33. Tag # Creando tags $ git tag v1.0 $ git tag v1.0 $ git tag beta1 HEAD^ $ git tag beta1 v1.0 $ git tag beta2 HEAD~5 $ git tag beta1 beta2 V1.0 # Borrando tags $ git tag -d beta2 Deleted tag 'beta2' (was f379043)
  • 34. Trabajando en equipo By Steve Punter - http://www.flickr.com/photos/spunter/2947192314
  • 35. Trabajando en equipo # Clonando un repositorio $ git clone foo foo_clone Initialized empty Git repository in ~/foo_clone/.git/ $ cd foo_clone $ git remote origin $ git remote show origin * remote origin Fetch URL: ~/foo Push URL: ~/foo HEAD branch (remote HEAD is ambiguous, may be one of the following): master riojaparty Remote branches: loading tracked master tracked riojaparty tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date)
  • 36. Trabajando en equipo $ git clone --bare foo foo.git Initialized empty Git repository in ~/foo.git/ $ ls foo.git/ branches config description HEAD hooks info objects packed-refs refs
  • 37. Trabajando en equipo # Enviando cambios al repositorio remoto $ git clone foo.git foo_bare # Realizamos cambios... $ git push Counting objects: 3, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 250 bytes, done. Total 2 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (2/2), done. To ~/foo.git c2d55e3..012f07d master -> master
  • 38. Trabajando en equipo # Actualizando nuestra copia local... $ git pull remote: Counting objects: 3, done. remote: Compressing objects: 100% (2/2), done. remote: Total 2 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (2/2), done. From ~/foo a6e1f75..83a30a8 master -> origin/master Updating a6e1f75..83a30a8 Fast-forward 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 add_another_file.txt
  • 39. Trabajando en equipo # Enviando cambios a un repositorio remoto concreto # Hacemos algunos cambios y entonces... $ git push origin master Counting objects: 3, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 265 bytes, done. Total 2 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (2/2), done. To ../foo.git 012f07d..0a5d1cd master -> master
  • 40. Conflictos By NWharry - http://www.flickr.com/photos/nightwing_26/5151831220/
  • 41. Extras ● Stash ● Blame ● Bisect ● Ramas y tags remotos ● Workflows ● …
  • 42. ¡Gracias! By woodleywonderworks - http://www.flickr.com/photos/wwworks/4759535950/
  • 43. Enlaces Git - http://git-scm.com/ Tutoriales y libros: Git Immersion - http://gitimmersion.com/ Pro Git (Scott Chacon) - http://www.humbug.in/docs/pro-git-book-es/ Pragmatic Guide To Git - http://pragprog.com/titles/pg_git/pragmatic-guide-to-git Pensamientos: Joel on Software - http://www.joelonsoftware.com/items/2010/03/17.html Presentaciones: Git 101 - http://www.slideshare.net/chacon/git-101-presentation The everyday developer's guide to version control with Git - http://www.slideshare.net/erincarter/the-everyday-developers-guide-to-version-control-with-git Git - http://www.slideshare.net/jnewland/git-512895 Git Started With Git - http://www.slideshare.net/qrush/git-started-with-git