100713_egit_webinar.pdf

Upload: alterfritz3091

Post on 03-Apr-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 100713_Egit_Webinar.pdf

    1/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Understanding and Using Git at Eclipsehttp://eclipse.org/egit

    Chris Aniszczyk (Red Hat)[email protected]

    http://aniszczyk.org

    Shawn Pearce (Google)[email protected]://spearce.org

  • 7/28/2019 100713_Egit_Webinar.pdf

    2/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Agenda

    Introduction How Git Works Demos Conclusion Q&A

  • 7/28/2019 100713_Egit_Webinar.pdf

    3/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Git and Eclipse

    Git is a Distributed Version Control System (DVCS, GPL)

    EGit is an Eclipse Team provider for Git (EPL).

    JGit is a lightweight Java library implementing Git (EDL).

    Technology sub projects (incubation) http://www.eclipse.org/egit http://www.eclipse.org/jgit

    The goal is to build a community around Git at Eclipse

  • 7/28/2019 100713_Egit_Webinar.pdf

    4/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    EGit and JGit Diverse Committership

    Chris Aniszczyk (Red Hat) Christian Halstrick (SAP) Mik Kersten (Tasktop) Mathias Kinzler (SAP) Stefan Lay (SAP)

    Mykola Nikishov (Independent) Shawn Pearce (Google) Robin Rosenberg (Dewire) Matthias Sohn (SAP) Remy Suen (IBM)

    Gunnar Wagenknecht (Ageto)

  • 7/28/2019 100713_Egit_Webinar.pdf

    5/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Git at Eclipse

    Eclipse is moving to Git...

    http://git.eclipse.org

  • 7/28/2019 100713_Egit_Webinar.pdf

    6/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    History

    2005 Linus Torvalds starts Git

    2006 Proof-of-concept, quite unusable2007 Index reader, quickdiff2008 Add history view, commit, push/fetch2009 Eclipse decides on Git; moved to Eclipse.org

    3/2010 Released 0.7Diff/Merge Algorithms, Automatic IP Logs6/2010 Released 0.8 (Helios)

    Usability Improvements, Git Repositories View, Tagging

    9/2010 Planned 0.9 (Helios SR1)

    Merge, Synchronize View, Stashing, Staging

    12/2010 Planned 1.0

  • 7/28/2019 100713_Egit_Webinar.pdf

    7/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Git, Eclipse and Rome

    EGit is still beta (incubation by Eclipse terms) and we want toestablish a feedback loop to improve the tooling

    Rome wasnt built in a day

  • 7/28/2019 100713_Egit_Webinar.pdf

    8/25

    13

    Features in EGit 0.8

    SupportedPartiallysupportedNot yet supported* planned for 0.9in September 10

    git init / git clone

    git add

    git status

    git commit git dif

    git fetch

    git log

    git merge*

    git rebase

    git remote

    git pull

    git push

    git stash*

    git branch git tag

    git checkout

    git config*

    git format-patch

    git mv* / git rm

    git reset

  • 7/28/2019 100713_Egit_Webinar.pdf

    9/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    No Free Lunch

    The best way to learn Git is to use Git

  • 7/28/2019 100713_Egit_Webinar.pdf

    10/25

    5

    Git vs. CVS/SVN

    Distributed (git)o Full local historyo Work off-lineo Fasto Rebase patches easilyo Forks happen,

    deal with ito Powerful merging,

    allows many branches

    Centralized (CVS) No No Slow

    Patches go stale Forks are painful Merging is painful

  • 7/28/2019 100713_Egit_Webinar.pdf

    11/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Agenda

    Introduction How Git Works Demos Conclusion Q&A

  • 7/28/2019 100713_Egit_Webinar.pdf

    12/25

    6

    How Git works?

    Staging directory

    Images taken from Pro Git book (http://progit.org)

  • 7/28/2019 100713_Egit_Webinar.pdf

    13/25

    6

    How Git works?

    Typical setup

    Images taken from Pro Git book (http://progit.org)

  • 7/28/2019 100713_Egit_Webinar.pdf

    14/25

    6

    How Git works?

    Any workflow...

    Images taken from Pro Git book (http://progit.org)

  • 7/28/2019 100713_Egit_Webinar.pdf

    15/25

    6

    How Git works?Saves state not deltas.

    Images taken from Pro Git book (http://progit.org)

  • 7/28/2019 100713_Egit_Webinar.pdf

    16/25

    7

    How Git works?

    Objects

    Images taken from Pro Git book (http://progit.org)

  • 7/28/2019 100713_Egit_Webinar.pdf

    17/25

    8

    How Git works?

    Branches and tags

    v1.3

    Images taken from Pro Git book (http://progit.org)

  • 7/28/2019 100713_Egit_Webinar.pdf

    18/25

    14

    How Git works?

    Structure of .gitextensionsglobal exclude file

    record branch changes

    object storage

    local branchesdefault main branch

    remote tracking branches, divided by repositorydefault remote repository

    default remote branch

    configuration for this repository

    cache for staging changes for next committip of current branch

  • 7/28/2019 100713_Egit_Webinar.pdf

    19/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Merging

    Merges are just the weaving together of two (or more)

    local branches into one

    However, unlike CVCS, you don't have to specify anythingabout where you're merging from and to; the treesautomatically know what their split point was in the past,and can work it out from there.

    Merging is much easier in a DVCS like Git

  • 7/28/2019 100713_Egit_Webinar.pdf

    20/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Agenda

    Introduction How Git Works Demos Conclusion Q&A

  • 7/28/2019 100713_Egit_Webinar.pdf

    21/25

    DemoA tour of EGit

    andGerrit Code Review

    How the EGit and JGit teams work

  • 7/28/2019 100713_Egit_Webinar.pdf

    22/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Agenda

    Introduction How Git Works Demos Conclusion Q&A

  • 7/28/2019 100713_Egit_Webinar.pdf

    23/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Conclusion

    DVCS like Git are powerful

    Git supports convenient branching and mergingGit is very fast and scales wellGerrit enables a nice code review workflow

    Git is the future SCM of Eclipse

  • 7/28/2019 100713_Egit_Webinar.pdf

    24/25

    Understanding and Using Git at Eclipse | 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

    Resources

    Ask questions on the EGit/JGit forums

    http://git-scm.com/documentation is your friend

    If you want comedy, watch Linus' talk at Google:http://www.youtube.com/watch?v=4XpnKHJAok8

    Read Pro Git: http://progit.org/book/

    http://whygitisbetterthanx.com/

    Read the EGit User Guidehttp://wiki.eclipse.org/EGit/User_Guide

  • 7/28/2019 100713_Egit_Webinar.pdf

    25/25

    Thanks!Q & A