SlideShare a Scribd company logo
Git & Github.
Nacho Martín
Git
Sistema de control
   de versiones
Sistema de control
   de versiones
   Distribuido
Ordenador 1   Servidor


  fichero      versión 3



              versión 2

Ordenador 2

              versión 1
  fichero
Ordenador 1


                fichero



               versión 3



               versión 2



               versión 1




Ordenador 2                 Ordenador 3


  fichero                      fichero



 versión 3                   versión 3



 versión 2                   versión 2



 versión 1                   versión 1
Ventajas
(y desventajas)
Muy rápido
Presentacion git
Ramas fáciles
Presentacion git
Flexible
Presentacion git
Más difícil
¿Más difícil?
Presentacion git
git init

                       o
git clone https://github.com/symfony/symfony.git
echo "hola mundo" > saludo
echo "hola mundo" > saludo
git status
echo "hola mundo" > saludo
git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what
will be committed)
#
# saludo
nothing added to commit but untracked files
present (use "git add" to track)
echo "hola mundo" > saludo
git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what
will be committed)
#
# saludo
nothing added to commit but untracked files
present (use "git add" to track)
echo "hola mundo" > saludo
git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what
will be committed)
#
# saludo
nothing added to commit but untracked files
present (use "git add" to track)
git add saludo
git add saludo
git status
git add saludo
git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: saludo
#
git commit -m "Commit inicial"
git commit -m "Commit inicial"

[master (root-commit) df5839d] Commit inicial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 saludo
git commit -m "Commit inicial"

[master (root-commit) df5839d] Commit inicial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 saludo

git log
git commit -m "Commit inicial"

[master (root-commit) df5839d] Commit inicial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 saludo

git log

commit df5839d78e7b9c14672ca722c80f2a5a897ebfba
Author: Nacho Martín <nitram.ohcan@gmail.com>
Date: Tue Nov 8 14:43:38 2011 +0100

  Commit inicial
git commit -m "Commit inicial"

[master (root-commit) df5839d] Commit inicial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 saludo

git log

commit df5839d78e7b9c14672ca722c80f2a5a897ebfba
Author: Nacho Martín <nitram.ohcan@gmail.com>
Date: Tue Nov 8 14:43:38 2011 +0100

  Commit inicial
git commit -m "Commit inicial"

[master (root-commit) df5839d] Commit inicial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 saludo

git log

commit df5839d78e7b9c14672ca722c80f2a5a897ebfba
Author: Nacho Martín <nitram.ohcan@gmail.com>
Date: Tue Nov 8 14:43:38 2011 +0100

  Commit inicial
git commit -m "Commit inicial"

[master (root-commit) df5839d] Commit inicial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 saludo

git log

commit df5839d78e7b9c14672ca722c80f2a5a897ebfba
Author: Nacho Martín <nitram.ohcan@gmail.com>
Date: Tue Nov 8 14:43:38 2011 +0100

  Commit inicial

gitk      o   GitX
                                 master
echo "como va todo" >> saludo

    Cambios sin commitear
     master   Commit inicial
echo "como va todo" >> saludo

    Cambios sin commitear
     master   Commit inicial

git add saludo
git commit -m "Amplio saludo"

     master   Amplio saludo
    Commit inicial
echo "como va todo" >> saludo

    Cambios sin commitear
     master   Commit inicial


git commit -a -m "Amplio saludo"

     master   Amplio saludo
    Commit inicial
echo "como va todo" >> saludo

    Cambios sin commitear
      master   Commit inicial
                   Solo para ficheros
                   ya trackeados
git commit -a -m "Amplio saludo"

      master   Amplio saludo
    Commit inicial
master
master   Amplio saludo
Commit inicial ( df5839d78e7... )
master   Amplio saludo
    Commit inicial ( df5839d78e7... )

git checkout df5839

     master   Amplio saludo
    Commit inicial
master    Amplio saludo
    Commit inicial ( df5839d78e7... )

git checkout df5839

     master    Amplio saludo
    Commit inicial

git checkout master

      master

    Commit inicial ( df5839d78e7... )
Presentacion git
Alicia                              Github


git remote add origin git://github.com/user/repo.git


                                         remotes/origin/master




        master
Alicia                    Github
git fetch origin




     remotes/origin/master   remotes/origin/master




     master
Alicia                             Github
git fetch origin
git merge origin/master


     master   remotes/origin/master   remotes/origin/master
Alicia                                     Github
git fetch origin
git merge origin/master               }   git pull origin master



     master   remotes/origin/master           remotes/origin/master
Alicia        Github




     master




                remotes/origin/master
Alicia                               Github

git push origin master




        master   remotes/origin/master     remotes/origin/master
svn update        git pull


svn update -r     git checkout


svn add archivo   git add archivo


                  git commit -a -m
svn commit -m
                  git push
Ramas
git checkout -b facebook




     master   facebook
2 commits más tarde...




     facebook




     master
git checkout master




     facebook




     master
git checkout master
git merge facebook




     master   facebook
git checkout master
git merge facebook
git branch -d facebook




     master
facebook




master
facebook




master
git checkout master




     facebook




     master
arreglamos bug en master (y hacemos commit)




          facebook




          master
git checkout facebook




          facebook




          master
git merge master




          master   facebook
facebook




master
git rebase master




           facebook




           master
meld
En el tintero...



git rm <fichero>
git mv <fichero> <destino>
git reset d5f64567 [--hard]
git tag version-1.0 d5f64567
git cherry-pick
git submodule
Symfony2 ♥ Git
bin/vendors



deps                 deps.lock
deps
  [symfony]
    git=http://github.com/symfony/symfony.git
    version=v2.0.5
                                    prioritario
  deps.lock
  symfony 7f21a5e9792f892166a550bb5579




                      {
                          git clone <repositorio>
bin/vendors install       git fetch origin
                          git reset --hard <version>
Github
Presentacion git
Presentacion git
Presentacion git
Presentacion git
Presentacion git
Presentacion git
Presentacion git
Presentacion git
Presentacion git
Repo
          Fork!
                       MiRepo

                        Work


                       MiRepo'

        Pull request
Repo'
Presentacion git
Presentacion git
¿PARA QUÉ?



    http://www.flickr.com/photos/deadwords/2473829859/
¿Preguntas?
Gracias
 nitram.ohcan@gmail.com
 @nacmartin


      limenius.com

More Related Content

What's hot (20)

PPTX
Git One Day Training Notes
glen_a_smith
 
PDF
Git and github 101
Senthilkumar Gopal
 
PDF
Git and git flow
Fran García
 
PDF
Github - Git Training Slides: Foundations
Lee Hanxue
 
PPTX
Git 101 for Beginners
Anurag Upadhaya
 
PPT
Git Introduction
Gareth Hall
 
PPTX
Git
Shinu Suresh
 
PPTX
Github
MeetPatel710
 
PDF
Introducing GitLab (June 2018)
Noa Harel
 
PDF
Version Control with Git
Luigi De Russis
 
PDF
Starting with Git & GitHub
Nicolás Tourné
 
PPTX
Github
piyush khadse
 
PDF
Introduction to GitHub Actions
Knoldus Inc.
 
PDF
Git 101: Git and GitHub for Beginners
HubSpot
 
PPTX
Github basics
Radoslav Georgiev
 
PDF
Introduction to GitHub Actions
Bo-Yi Wu
 
PPTX
Intro to git and git hub
Venkat Malladi
 
PDF
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
PPTX
Git - Basic Crash Course
Nilay Binjola
 
PPTX
Git in 10 minutes
Safique Ahmed Faruque
 
Git One Day Training Notes
glen_a_smith
 
Git and github 101
Senthilkumar Gopal
 
Git and git flow
Fran García
 
Github - Git Training Slides: Foundations
Lee Hanxue
 
Git 101 for Beginners
Anurag Upadhaya
 
Git Introduction
Gareth Hall
 
Github
MeetPatel710
 
Introducing GitLab (June 2018)
Noa Harel
 
Version Control with Git
Luigi De Russis
 
Starting with Git & GitHub
Nicolás Tourné
 
Introduction to GitHub Actions
Knoldus Inc.
 
Git 101: Git and GitHub for Beginners
HubSpot
 
Github basics
Radoslav Georgiev
 
Introduction to GitHub Actions
Bo-Yi Wu
 
Intro to git and git hub
Venkat Malladi
 
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
Git - Basic Crash Course
Nilay Binjola
 
Git in 10 minutes
Safique Ahmed Faruque
 

Similar to Presentacion git (20)

PDF
Loading...git
Rafael García
 
PDF
Introducción a git y GitHub
Lucas Videla
 
PDF
GTFO: Git Theory For OpenSource
Forest Mars
 
PDF
Git basics
Amit Sawhney
 
PPTX
Presentación de Git y Github CS50W en español.pptx
CarlosRuiz456086
 
KEY
Git Magic: Versioning Files like a Boss
tmacwilliam
 
PPTX
Get going with_git_ppt
Miraz Al-Mamun
 
PDF
Git For The Android Developer
Effective
 
PDF
Version control system
Andrew Liu
 
PDF
Git for the Android Developer
Effective
 
PDF
Git for the Android Developer
EffectiveUI
 
PDF
SCM for Android Developers Using Git
Tony Hillerson
 
PDF
Wokshop de Git
Alberto Leal
 
KEY
Git Tech Talk
Chris Johnson
 
PDF
Using git in eclipse by Chris Aniszczyk
EclipseDayParis
 
PDF
Advanced Git Tutorial
Sage Sharp
 
PDF
Jedi Mind Tricks in Git
Johan Abildskov
 
PDF
Git for beginners
Arulmurugan Rajaraman
 
PDF
Git it on (includes git hub)
Martin Bing
 
Loading...git
Rafael García
 
Introducción a git y GitHub
Lucas Videla
 
GTFO: Git Theory For OpenSource
Forest Mars
 
Git basics
Amit Sawhney
 
Presentación de Git y Github CS50W en español.pptx
CarlosRuiz456086
 
Git Magic: Versioning Files like a Boss
tmacwilliam
 
Get going with_git_ppt
Miraz Al-Mamun
 
Git For The Android Developer
Effective
 
Version control system
Andrew Liu
 
Git for the Android Developer
Effective
 
Git for the Android Developer
EffectiveUI
 
SCM for Android Developers Using Git
Tony Hillerson
 
Wokshop de Git
Alberto Leal
 
Git Tech Talk
Chris Johnson
 
Using git in eclipse by Chris Aniszczyk
EclipseDayParis
 
Advanced Git Tutorial
Sage Sharp
 
Jedi Mind Tricks in Git
Johan Abildskov
 
Git for beginners
Arulmurugan Rajaraman
 
Git it on (includes git hub)
Martin Bing
 
Ad

More from Ignacio Martín (18)

PDF
Elixir/OTP for PHP developers
Ignacio Martín
 
PDF
Introduction to React Native Workshop
Ignacio Martín
 
PDF
Server side rendering with React and Symfony
Ignacio Martín
 
PDF
Symfony 4 Workshop - Limenius
Ignacio Martín
 
PDF
Server Side Rendering of JavaScript in PHP
Ignacio Martín
 
PDF
Extending Redux in the Server Side
Ignacio Martín
 
PDF
Redux Sagas - React Alicante
Ignacio Martín
 
PDF
React Native Workshop - React Alicante
Ignacio Martín
 
PDF
Asegurando APIs en Symfony con JWT
Ignacio Martín
 
PDF
Redux saga: managing your side effects. Also: generators in es6
Ignacio Martín
 
PDF
Integrating React.js with PHP projects
Ignacio Martín
 
PDF
Introduction to Redux
Ignacio Martín
 
PDF
Keeping the frontend under control with Symfony and Webpack
Ignacio Martín
 
PDF
Integrando React.js en aplicaciones Symfony (deSymfony 2016)
Ignacio Martín
 
PDF
Adding Realtime to your Projects
Ignacio Martín
 
PDF
Symfony & Javascript. Combining the best of two worlds
Ignacio Martín
 
PDF
Symfony 2 CMF
Ignacio Martín
 
PDF
Doctrine2 sf2Vigo
Ignacio Martín
 
Elixir/OTP for PHP developers
Ignacio Martín
 
Introduction to React Native Workshop
Ignacio Martín
 
Server side rendering with React and Symfony
Ignacio Martín
 
Symfony 4 Workshop - Limenius
Ignacio Martín
 
Server Side Rendering of JavaScript in PHP
Ignacio Martín
 
Extending Redux in the Server Side
Ignacio Martín
 
Redux Sagas - React Alicante
Ignacio Martín
 
React Native Workshop - React Alicante
Ignacio Martín
 
Asegurando APIs en Symfony con JWT
Ignacio Martín
 
Redux saga: managing your side effects. Also: generators in es6
Ignacio Martín
 
Integrating React.js with PHP projects
Ignacio Martín
 
Introduction to Redux
Ignacio Martín
 
Keeping the frontend under control with Symfony and Webpack
Ignacio Martín
 
Integrando React.js en aplicaciones Symfony (deSymfony 2016)
Ignacio Martín
 
Adding Realtime to your Projects
Ignacio Martín
 
Symfony & Javascript. Combining the best of two worlds
Ignacio Martín
 
Symfony 2 CMF
Ignacio Martín
 
Doctrine2 sf2Vigo
Ignacio Martín
 
Ad

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
July Patch Tuesday
Ivanti
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
July Patch Tuesday
Ivanti
 

Presentacion git

  • 2. Git
  • 3. Sistema de control de versiones
  • 4. Sistema de control de versiones Distribuido
  • 5. Ordenador 1 Servidor fichero versión 3 versión 2 Ordenador 2 versión 1 fichero
  • 6. Ordenador 1 fichero versión 3 versión 2 versión 1 Ordenador 2 Ordenador 3 fichero fichero versión 3 versión 3 versión 2 versión 2 versión 1 versión 1
  • 17. git init o git clone https://github.com/symfony/symfony.git
  • 18. echo "hola mundo" > saludo
  • 19. echo "hola mundo" > saludo git status
  • 20. echo "hola mundo" > saludo git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # saludo nothing added to commit but untracked files present (use "git add" to track)
  • 21. echo "hola mundo" > saludo git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # saludo nothing added to commit but untracked files present (use "git add" to track)
  • 22. echo "hola mundo" > saludo git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # saludo nothing added to commit but untracked files present (use "git add" to track)
  • 25. git add saludo git status # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: saludo #
  • 26. git commit -m "Commit inicial"
  • 27. git commit -m "Commit inicial" [master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo
  • 28. git commit -m "Commit inicial" [master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo git log
  • 29. git commit -m "Commit inicial" [master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo git log commit df5839d78e7b9c14672ca722c80f2a5a897ebfba Author: Nacho Martín <[email protected]> Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicial
  • 30. git commit -m "Commit inicial" [master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo git log commit df5839d78e7b9c14672ca722c80f2a5a897ebfba Author: Nacho Martín <[email protected]> Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicial
  • 31. git commit -m "Commit inicial" [master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo git log commit df5839d78e7b9c14672ca722c80f2a5a897ebfba Author: Nacho Martín <[email protected]> Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicial
  • 32. git commit -m "Commit inicial" [master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo git log commit df5839d78e7b9c14672ca722c80f2a5a897ebfba Author: Nacho Martín <[email protected]> Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicial gitk o GitX master
  • 33. echo "como va todo" >> saludo Cambios sin commitear master Commit inicial
  • 34. echo "como va todo" >> saludo Cambios sin commitear master Commit inicial git add saludo git commit -m "Amplio saludo" master Amplio saludo Commit inicial
  • 35. echo "como va todo" >> saludo Cambios sin commitear master Commit inicial git commit -a -m "Amplio saludo" master Amplio saludo Commit inicial
  • 36. echo "como va todo" >> saludo Cambios sin commitear master Commit inicial Solo para ficheros ya trackeados git commit -a -m "Amplio saludo" master Amplio saludo Commit inicial
  • 38. master Amplio saludo Commit inicial ( df5839d78e7... )
  • 39. master Amplio saludo Commit inicial ( df5839d78e7... ) git checkout df5839 master Amplio saludo Commit inicial
  • 40. master Amplio saludo Commit inicial ( df5839d78e7... ) git checkout df5839 master Amplio saludo Commit inicial git checkout master master Commit inicial ( df5839d78e7... )
  • 42. Alicia Github git remote add origin git://github.com/user/repo.git remotes/origin/master master
  • 43. Alicia Github git fetch origin remotes/origin/master remotes/origin/master master
  • 44. Alicia Github git fetch origin git merge origin/master master remotes/origin/master remotes/origin/master
  • 45. Alicia Github git fetch origin git merge origin/master } git pull origin master master remotes/origin/master remotes/origin/master
  • 46. Alicia Github master remotes/origin/master
  • 47. Alicia Github git push origin master master remotes/origin/master remotes/origin/master
  • 48. svn update git pull svn update -r git checkout svn add archivo git add archivo git commit -a -m svn commit -m git push
  • 49. Ramas
  • 50. git checkout -b facebook master facebook
  • 51. 2 commits más tarde... facebook master
  • 52. git checkout master facebook master
  • 53. git checkout master git merge facebook master facebook
  • 54. git checkout master git merge facebook git branch -d facebook master
  • 57. git checkout master facebook master
  • 58. arreglamos bug en master (y hacemos commit) facebook master
  • 59. git checkout facebook facebook master
  • 60. git merge master master facebook
  • 62. git rebase master facebook master
  • 63. meld
  • 64. En el tintero... git rm <fichero> git mv <fichero> <destino> git reset d5f64567 [--hard] git tag version-1.0 d5f64567 git cherry-pick git submodule
  • 66. bin/vendors deps deps.lock
  • 67. deps [symfony] git=http://github.com/symfony/symfony.git version=v2.0.5 prioritario deps.lock symfony 7f21a5e9792f892166a550bb5579 { git clone <repositorio> bin/vendors install git fetch origin git reset --hard <version>
  • 78. Repo Fork! MiRepo Work MiRepo' Pull request Repo'
  • 81. ¿PARA QUÉ? http://www.flickr.com/photos/deadwords/2473829859/