Top Banner
© 2010 Mayflower GmbH Git für Fortgeschrittene David Soria Parra I 31. May 2010 | @dsp_ Montag, 31. Mai 2010
29

Git für Fortgeschrittene

May 17, 2015

Download

Technology

Mayflower GmbH
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Git für Fortgeschrittene

© 2010 Mayflower GmbH

Git für Fortgeschrittene

David Soria Parra I 31. May 2010 | @dsp_

Montag, 31. Mai 2010

Page 2: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

I Man hat Git benutzt

I Man kann committen

I Branch, Push, Pull, Checkout

Erwartungen

Montag, 31. Mai 2010

Page 3: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

I Viele migrieren: Zend Framework, phpBB, PHPUnit, ...

I Größere Projekte haben komplexe Anwendungsfälle

I Wir sind am Anfang des Technology Life Cycle

Motivation

Montag, 31. Mai 2010

Page 4: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Beispiel

developer

Montag, 31. Mai 2010

Page 5: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Branch und Rebase

Editieren Commit Veröffentlichen

Montag, 31. Mai 2010

Page 6: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Feature Branch„Jedes Feature auf eine Branch“

Montag, 31. Mai 2010

Page 7: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

masterfeature-x

DAG (Directed Acyclic Graph)

Montag, 31. Mai 2010

Page 8: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

master

feature-y

git checkout feature-y git rebase master

Montag, 31. Mai 2010

Page 9: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Branch und Rebase

Commit Rebase Merge

Montag, 31. Mai 2010

Page 10: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

feature-y

bf0255ae

git rebase -i bf0225ae pick / rotate squash

Branch und Rebase

Montag, 31. Mai 2010

Page 11: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

„Never rebase branches that you pulled or pushed. Rebase local branches only!“

Montag, 31. Mai 2010

Page 12: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Index

Montag, 31. Mai 2010

Page 13: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

$ 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.md#no changes added to commit (use "git add" and/or "git commit -a")

$ git commitno changes added to commit (use "git add" and/or "git commit -a")

Montag, 31. Mai 2010

Page 14: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

working directory index repository

git add [file]

git commit

git commit -a

git stage [file]

Montag, 31. Mai 2010

Page 15: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

static int run_builtin(struct cmd_st+ int status, help; struct stat st; const char *prefix;

prefix = NULL; help = argc == 2 && !strcmp(argv[1], if (!help) { if (p->option & RUN_SETUP) prefix = setup_git_directory();

+ if (use_pager == -1 && p->option+ use_pager = check_pager_c+ if (use_pager == -1 && p->option+ use_pager = 1; } commit_pager_choice();

Commit

git add -i

Montag, 31. Mai 2010

Page 16: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Neue KonzepteNeue Möglichkeiten

Montag, 31. Mai 2010

Page 17: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Projekt

Montag, 31. Mai 2010

Page 18: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

externe Module

submodules

Montag, 31. Mai 2010

Page 19: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Zend Framework 2

phpBB

git.zendframework.com

git init phpBB

git submodule add git://..../zf2.git Zend Framework 2

Montag, 31. Mai 2010

Page 20: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Zend Framework 2

Symphony 2

phpBB

git.zendframework.com

git.github.com

git clone git submodule init git submodule update

Montag, 31. Mai 2010

Page 21: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Git ist kein Subversion

Montag, 31. Mai 2010

Page 22: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

system integration

AdministrativesMontag, 31. Mai 2010

Page 23: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Reflog

Montag, 31. Mai 2010

Page 24: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

I Das Tool zur Recovery

I WICHTIG!

Reflog

Montag, 31. Mai 2010

Page 25: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

git checkout test git checkout master git branch -D test

HEAD@{1}

Montag, 31. Mai 2010

Page 26: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

Git ist manchmal trickreich

Montag, 31. Mai 2010

Page 27: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

I DAG und Rebase

I Index

I Submodule

I Reflog

Zusammenfassung

Montag, 31. Mai 2010

Page 28: Git für Fortgeschrittene

Git für Fortgeschrittene I Mayflower GmbH I May 31, 2010 I

I Konzepten

I Storage Format

I Refspecs

I Cooles Features

I Bisect

I Notes

Weiterführendes

Montag, 31. Mai 2010

Page 29: Git für Fortgeschrittene

Vielen Dank für Ihre Aufmerksamkeit!

© 2010 Mayflower GmbH

Fragen?

Montag, 31. Mai 2010