Transcription

Understanding and Using Git at Eclipsehttp://eclipse.org/egitChris Aniszczyk (Red Hat)[email protected]://aniszczyk.orgShawn Pearce ing and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Agenda IntroductionHow Git WorksDemosConclusionQ&AUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Git and EclipseGit 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/jgitThe goal is to build a community around Git at EclipseUnderstanding 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)Understanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Git at EclipseEclipse is moving to Git.http://git.eclipse.orgUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

History20052006200720082009Linus Torvalds starts GitProof-of-concept, quite unusableIndex reader, quickdiffAdd history view, commit, push/fetchEclipse decides on Git; moved to Eclipse.org3/2010 Released 0.7Diff/Merge Algorithms, Automatic IP Logs6/2010 Released 0.8 (Helios)Usability Improvements, Git Repositories View, Tagging9/2010 Planned 0.9 (Helios SR1)Merge, Synchronize View, Stashing, Staging12/2010 Planned 1.0Understanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Git, Eclipse and RomeEGit is still beta (incubation by Eclipse terms) and we want toestablish a feedback loop to improve the tooling“Rome wasn’t built in a day”Understanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Features in EGit 0.8 git init / git clone git pull git add git push git status git stash* git commit git branch git diff git tag git fetch git checkout git log git config* git merge* git format-patch git rebase git mv* / git rm git remote git resetSupportedPartiallysupportedNot yet supported* planned for 0.9in September ’1013

No Free LunchThe best way to learn Git is to use GitUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Git vs. CVS/SVN Distributed (git)ooooooFull local historyWork off-lineFastRebase patches easilyForks happen,deal with itPowerful merging,allows many branches Centralized (CVS) NoNoSlowPatches go staleForks are painfulMerging is painful5

Agenda IntroductionHow Git WorksDemosConclusionQ&AUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

How Git works?Staging directoryImages taken from Pro Git book (http://progit.org)6

How Git works?Typical setupImages taken from Pro Git book (http://progit.org)6

How Git works?Any workflow.Images taken from Pro Git book (http://progit.org)6

How Git works?Saves state not deltas.Images taken from Pro Git book (http://progit.org)6

How Git works?ObjectsImages taken from Pro Git book (http://progit.org)7

How Git works?Branches and tagsv1.3Images taken from Pro Git book (http://progit.org)8

How Git works?Structure of .gitextensionsglobal exclude filerecord branch changesobject storagelocal branchesdefault main branchremote tracking branches, divided by repositorydefault remote repositorydefault remote branchconfiguration for this repositorytip of current branchcache for staging changes for next commit14

MergingMerges are just the weaving together of two (or more)local branches into oneHowever, 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 GitUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Agenda IntroductionHow Git WorksDemosConclusionQ&AUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

DemoA tour of EGitandGerrit Code Review“How the EGit and JGit teams work”

Agenda IntroductionHow Git WorksDemosConclusionQ&AUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

ConclusionDVCS like Git are powerfulGit supports convenient branching and mergingGit is very fast and scales wellGerrit enables a nice code review workflowGit is the future SCM of EclipseUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

ResourcesAsk questions on the EGit/JGit forumshttp://git-scm.com/documentation is your friendIf you want comedy, watch Linus' talk at Google:http://www.youtube.com/watch?v 4XpnKHJAok8Read Pro Git: com/Read the EGit User Guidehttp://wiki.eclipse.org/EGit/User GuideUnderstanding and Using Git at Eclipse 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn

Thanks!Q&A