SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
Git
Differences to svn
●   Es kann nur das Hauptverzeichnis
    ausgescheckt werden
●   Dezentral
●   Checkout enthält alle commits
●   Offline commits
Config
~/.gitconfig
●   git config --global user.name "Gordon Franke"
●   git config --global user.email "info@nevalon.de"
[user]
      name = Gordon Franke
      email = info@nevalon.de
.gitignore
●   Dateien und Verzeichnisse ignorieren


.DS_Store
Thumbs.db
nbproject
test/*/cache/
*.orig
.svn
Daily Business
Create
●   Neues Repository
    ●   git init
●   Clone Repository (Checkout)
    ●   git clone source destination
Status
●   Status abfragen
    ●   git status
●   Dateien müssen explizit mit zum commit
    hinzugefügt werden
    ●   git add file
●   Liste alle
    unversioniert/neu/gelöscht/modifiziert/modifiziert
    aber nicht hinzugefügt Dateien und Verzeichnissen
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
#      new file: test
#      new file: test2
#
# 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: test
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
#      test3
Commit
●   Änderungen sind zunächst lokal und offline
    ●   git commit -m „my first commit“
●   Zum remote senden
    ●   git push
Submodule
Submodules („externals“)
●   einbinden
    ●   git submodule add path
●   Listen
    ●   git submodule
●   Initialisieren
    ●   git submodule init
●   Update
    ●   git submodule update
.gitmodules
[submodule "dmCorePlugin/plugins/sfImageTransformPlugin"]
    path = dmCorePlugin/plugins/sfImageTransformPlugin
     url = git://github.com/diem-
project/sfImageTransformPlugin.git
[submodule "dmCorePlugin/plugins/sfWebBrowserPlugin"]
    path = dmCorePlugin/plugins/sfWebBrowserPlugin
    url = git://github.com/diem-project/sfWebBrowserPlugin.git
Branch
Branch
●   Erstellen
    ●   git branch branch_name
●   Switch
    ●   git checkout branch_name
●   Merge
    ●   git pull remote_name branch_name
●   Löschen
    ●   git branch -d branch_name
History
Log
●   Letzten n Änderungen anzeigen
    ●     git log -<n>
●   Patch generieren
    ●     git log -p -<n>
●   Farbe
    ●     git log -p -<n> --color
●   ...
commit a80a9333443b51b6932a532d77fd47945df10ef1
Author: Gordon Franke <info@nevalon.de>
Date: Sat May 1 15:29:20 2010 +0200

  2 commit

commit f953a9ed37f3cd98fff70cb070e72137e4b66735
Author: Gordon Franke <info@nevalon.de>
Date: Sat May 1 15:28:31 2010 +0200

  start
About me
Gordon Franke
●   Deutschland
●   Entwickler
●   Chip Xonio Online GmbH
    (www.chip.de)
●   Blog (blog.nevalon.de)
●   Twitter (twitter.com/gimler)

Weitere ähnliche Inhalte

Andere mochten auch

Suplemento Boletin Oficial
Suplemento Boletin OficialSuplemento Boletin Oficial
Suplemento Boletin OficialForo Blog
 
Flora in Dzierzoniow, zuzia
Flora in Dzierzoniow, zuziaFlora in Dzierzoniow, zuzia
Flora in Dzierzoniow, zuziaguest6167bf
 
De l’amor a l’odi
De l’amor a l’odiDe l’amor a l’odi
De l’amor a l’odijoanpol
 
Denuncia penal contra COBOS
Denuncia penal contra COBOS Denuncia penal contra COBOS
Denuncia penal contra COBOS Foro Blog
 
Presentation1
Presentation1Presentation1
Presentation1Fabrik
 
Diapositivas tecno
Diapositivas tecnoDiapositivas tecno
Diapositivas tecnoyajaira
 
apropament a GNU/Linux
apropament a GNU/Linuxapropament a GNU/Linux
apropament a GNU/LinuxMarc Navarro
 
Mines de gavà
Mines de gavàMines de gavà
Mines de gavàmalsius2
 
Fallo que habilita el uso de reservas del BCRA
Fallo que habilita el uso de reservas del BCRAFallo que habilita el uso de reservas del BCRA
Fallo que habilita el uso de reservas del BCRAForo Blog
 
Lauriete - Guarda o Que Tens Versão 1
Lauriete - Guarda o Que Tens Versão 1Lauriete - Guarda o Que Tens Versão 1
Lauriete - Guarda o Que Tens Versão 1Willian Carvalho
 
Escolarización del pueblo piegmeo de Camerún
Escolarización del pueblo piegmeo de CamerúnEscolarización del pueblo piegmeo de Camerún
Escolarización del pueblo piegmeo de Camerúnmanuelagudo00
 
Apresentação apimec 2006
Apresentação apimec 2006Apresentação apimec 2006
Apresentação apimec 2006CSURIWEB
 

Andere mochten auch (20)

Suplemento Boletin Oficial
Suplemento Boletin OficialSuplemento Boletin Oficial
Suplemento Boletin Oficial
 
Oceania
OceaniaOceania
Oceania
 
Pit Babes
Pit BabesPit Babes
Pit Babes
 
Inleiding stranddag
Inleiding stranddagInleiding stranddag
Inleiding stranddag
 
Flora in Dzierzoniow, zuzia
Flora in Dzierzoniow, zuziaFlora in Dzierzoniow, zuzia
Flora in Dzierzoniow, zuzia
 
De l’amor a l’odi
De l’amor a l’odiDe l’amor a l’odi
De l’amor a l’odi
 
Denuncia penal contra COBOS
Denuncia penal contra COBOS Denuncia penal contra COBOS
Denuncia penal contra COBOS
 
Animaliak
Animaliak Animaliak
Animaliak
 
Presentation1
Presentation1Presentation1
Presentation1
 
Diapositivas tecno
Diapositivas tecnoDiapositivas tecno
Diapositivas tecno
 
apropament a GNU/Linux
apropament a GNU/Linuxapropament a GNU/Linux
apropament a GNU/Linux
 
4 7
4 74 7
4 7
 
Mostra Michelangelo
Mostra MichelangeloMostra Michelangelo
Mostra Michelangelo
 
Mines de gavà
Mines de gavàMines de gavà
Mines de gavà
 
Escultures 4t b
Escultures 4t bEscultures 4t b
Escultures 4t b
 
Familia
FamiliaFamilia
Familia
 
Fallo que habilita el uso de reservas del BCRA
Fallo que habilita el uso de reservas del BCRAFallo que habilita el uso de reservas del BCRA
Fallo que habilita el uso de reservas del BCRA
 
Lauriete - Guarda o Que Tens Versão 1
Lauriete - Guarda o Que Tens Versão 1Lauriete - Guarda o Que Tens Versão 1
Lauriete - Guarda o Que Tens Versão 1
 
Escolarización del pueblo piegmeo de Camerún
Escolarización del pueblo piegmeo de CamerúnEscolarización del pueblo piegmeo de Camerún
Escolarización del pueblo piegmeo de Camerún
 
Apresentação apimec 2006
Apresentação apimec 2006Apresentação apimec 2006
Apresentação apimec 2006
 

Ähnlich wie Git

git - eine praktische Einführung
git - eine praktische Einführunggit - eine praktische Einführung
git - eine praktische EinführungMarcel Eichner
 
Do it the_git_way
Do it the_git_wayDo it the_git_way
Do it the_git_wayPeter Ukena
 
Einführung Mercurial
Einführung MercurialEinführung Mercurial
Einführung Mercurialwielandp
 
Childthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGNChildthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGNpixolin
 
Versionierung mit GIT
Versionierung mit GITVersionierung mit GIT
Versionierung mit GITgedoplan
 
"git.net" gibt's nicht?
"git.net" gibt's nicht?"git.net" gibt's nicht?
"git.net" gibt's nicht?inovex GmbH
 
BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...
BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...
BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...Marc Müller
 
TYPO3 Migration in komplexen Upgrade- und Relaunch-Projekten
TYPO3 Migration in komplexen Upgrade- und Relaunch-ProjektenTYPO3 Migration in komplexen Upgrade- und Relaunch-Projekten
TYPO3 Migration in komplexen Upgrade- und Relaunch-ProjektenAlex Kellner
 
Vagrant - Einführung & Verwendung
Vagrant - Einführung & VerwendungVagrant - Einführung & Verwendung
Vagrant - Einführung & VerwendungTilo Baller
 
Sei (k)ein Blödmann und nimm Git!
Sei (k)ein Blödmann und nimm Git!Sei (k)ein Blödmann und nimm Git!
Sei (k)ein Blödmann und nimm Git!Stefan Imhoff
 
Our way to 19c - DOAG 2020
Our way to 19c - DOAG 2020Our way to 19c - DOAG 2020
Our way to 19c - DOAG 2020Torsten Kleiber
 
TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...
TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...
TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...Marc Müller
 
Lokale TYPO3 Entwicklungsumgebung mit DDEV
Lokale TYPO3 Entwicklungsumgebung mit DDEVLokale TYPO3 Entwicklungsumgebung mit DDEV
Lokale TYPO3 Entwicklungsumgebung mit DDEVPeter Kraume
 

Ähnlich wie Git (20)

git - eine praktische Einführung
git - eine praktische Einführunggit - eine praktische Einführung
git - eine praktische Einführung
 
Version management mit Git und Github
Version management mit Git und Github Version management mit Git und Github
Version management mit Git und Github
 
Versionskontrolle mit Git
Versionskontrolle mit GitVersionskontrolle mit Git
Versionskontrolle mit Git
 
Do it the_git_way
Do it the_git_wayDo it the_git_way
Do it the_git_way
 
git started – IPC2012
git started – IPC2012git started – IPC2012
git started – IPC2012
 
Einführung Mercurial
Einführung MercurialEinführung Mercurial
Einführung Mercurial
 
Git im team
Git im teamGit im team
Git im team
 
Childthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGNChildthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGN
 
Versionierung mit GIT
Versionierung mit GITVersionierung mit GIT
Versionierung mit GIT
 
Git Power-Workshop
Git Power-WorkshopGit Power-Workshop
Git Power-Workshop
 
"git.net" gibt's nicht?
"git.net" gibt's nicht?"git.net" gibt's nicht?
"git.net" gibt's nicht?
 
BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...
BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...
BASTA Spring 2016 - Moderne Versionsverwaltung mit Git, und der neue Build-Se...
 
TYPO3 Migration in komplexen Upgrade- und Relaunch-Projekten
TYPO3 Migration in komplexen Upgrade- und Relaunch-ProjektenTYPO3 Migration in komplexen Upgrade- und Relaunch-Projekten
TYPO3 Migration in komplexen Upgrade- und Relaunch-Projekten
 
Gitlab
GitlabGitlab
Gitlab
 
Mercurial
MercurialMercurial
Mercurial
 
Vagrant - Einführung & Verwendung
Vagrant - Einführung & VerwendungVagrant - Einführung & Verwendung
Vagrant - Einführung & Verwendung
 
Sei (k)ein Blödmann und nimm Git!
Sei (k)ein Blödmann und nimm Git!Sei (k)ein Blödmann und nimm Git!
Sei (k)ein Blödmann und nimm Git!
 
Our way to 19c - DOAG 2020
Our way to 19c - DOAG 2020Our way to 19c - DOAG 2020
Our way to 19c - DOAG 2020
 
TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...
TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...
TechDays 2016 - Der DevOps Kreislauf – Moderne Source Code Verwaltung und Pac...
 
Lokale TYPO3 Entwicklungsumgebung mit DDEV
Lokale TYPO3 Entwicklungsumgebung mit DDEVLokale TYPO3 Entwicklungsumgebung mit DDEV
Lokale TYPO3 Entwicklungsumgebung mit DDEV
 

Git

  • 1. Git
  • 2. Differences to svn ● Es kann nur das Hauptverzeichnis ausgescheckt werden ● Dezentral ● Checkout enthält alle commits ● Offline commits
  • 4. ~/.gitconfig ● git config --global user.name "Gordon Franke" ● git config --global user.email "info@nevalon.de" [user] name = Gordon Franke email = info@nevalon.de
  • 5. .gitignore ● Dateien und Verzeichnisse ignorieren .DS_Store Thumbs.db nbproject test/*/cache/ *.orig .svn
  • 7. Create ● Neues Repository ● git init ● Clone Repository (Checkout) ● git clone source destination
  • 8. Status ● Status abfragen ● git status ● Dateien müssen explizit mit zum commit hinzugefügt werden ● git add file ● Liste alle unversioniert/neu/gelöscht/modifiziert/modifiziert aber nicht hinzugefügt Dateien und Verzeichnissen
  • 9. # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: test # new file: test2 # # 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: test # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # test3
  • 10. Commit ● Änderungen sind zunächst lokal und offline ● git commit -m „my first commit“ ● Zum remote senden ● git push
  • 12. Submodules („externals“) ● einbinden ● git submodule add path ● Listen ● git submodule ● Initialisieren ● git submodule init ● Update ● git submodule update
  • 13. .gitmodules [submodule "dmCorePlugin/plugins/sfImageTransformPlugin"] path = dmCorePlugin/plugins/sfImageTransformPlugin url = git://github.com/diem- project/sfImageTransformPlugin.git [submodule "dmCorePlugin/plugins/sfWebBrowserPlugin"] path = dmCorePlugin/plugins/sfWebBrowserPlugin url = git://github.com/diem-project/sfWebBrowserPlugin.git
  • 15. Branch ● Erstellen ● git branch branch_name ● Switch ● git checkout branch_name ● Merge ● git pull remote_name branch_name ● Löschen ● git branch -d branch_name
  • 17. Log ● Letzten n Änderungen anzeigen ● git log -<n> ● Patch generieren ● git log -p -<n> ● Farbe ● git log -p -<n> --color ● ...
  • 18. commit a80a9333443b51b6932a532d77fd47945df10ef1 Author: Gordon Franke <info@nevalon.de> Date: Sat May 1 15:29:20 2010 +0200 2 commit commit f953a9ed37f3cd98fff70cb070e72137e4b66735 Author: Gordon Franke <info@nevalon.de> Date: Sat May 1 15:28:31 2010 +0200 start
  • 20. Gordon Franke ● Deutschland ● Entwickler ● Chip Xonio Online GmbH (www.chip.de) ● Blog (blog.nevalon.de) ● Twitter (twitter.com/gimler)