egit in eclipse - bandlem · 2010. 6. 21. · eclipse democamp london 2010 - dvcs and egit - alex...

28
EGit in Eclipse Distributed Verzion Control Systems 1 Monday, 21 June 2010

Upload: others

Post on 18-Feb-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

  • EGit in EclipseDistributed Verzion Control Systems

    1Monday, 21 June 2010

  • EGit in EclipseDistributed Verzion Control SystemsDistributed Verizon Control Systems

    1.11.2

    2Monday, 21 June 2010

  • EGit in EclipseDistributed Verzion Control SystemsDistributed Verizon Control SystemsDistributed Venison Control Systems

    1.11.21.3

    3Monday, 21 June 2010

  • EGit in EclipseDistributed Verzion Control SystemsDistributed Verizon Control SystemsDistributed Venison Control SystemsDistributed Version Control Systems

    1.11.21.31.4

    4Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    History of VCS

    rcs

    cvs

    svn

    Single file branching, locked

    Centralised server, shared

    Repository revisioning

    1.1 ➔ 1.2

    1.1 ➔ 1.2

    r1 ➔ r2

    5Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Centralised Version Control Systems

    6Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Distributed Version Control Systems

    clone clone

    cloneclone

    7Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    DVCS vs CVCS

    • Each user has the entire history checked out? Doesn’t that take a lot of space?• A Git repository uses about 2.5x CVS space• A Git repository uses about 1.2x SVN space• Tend to have one or a few projects per repository‣ Many repositories is easier to manage than one

    8Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    How does it work?

    +Verzion +Control

    -Verzion+Verizon Control

    -Verizon+Venison Control

    -Venison+Version Control

    1.1 1.2 1.3 1.4

    9Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    -Verzion+Version Control

    -Verzion+Verizon Control

    How does it work?+Verzion +Control

    -Verizon+Venison Control

    -Venison+Version Control

    ?10Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    How does it work?1eb242 793f12

    (1eb242)

    ac390b(1eb242)

    0249bc(ac390b)

    ?93r2d2(793f12,0249bc) Merge nodes havetwo (or more) parentsSHA Hash identifies node

    Each node has a parent(except the first)

    11Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Pull and Push1eb242 793f12

    (1eb242)

    ac390b(1eb242)

    0249bc(ac390b)

    ac390b(1eb242)

    0249bc(ac390b)

    1eb242 793f12(1eb242)

    Both repositories generatethe same merge node

    Pull copies nodes fromanother repository

    Push copies nodes toanother repository

    93r2d2(793f12,0249bc)

    93r2d2(793f12,0249bc)

    12Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Branching is easy

    • CVCS discourages branching• Mostly because the merge is impossible• DVCS merging becomes trivial• Simply replays the patch sets after each other• Branching becomes a way of life for DVCS• Think of it as auto-save for work in progress

    13Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Merging is easy

    • CVCS discourages branching• Mostly because the merge is impossible• DVCS merging becomes trivial• Simply replays the patch sets after each other• Branching becomes a way of life for DVCS• Think of it as auto-save for work in progress

    14Monday, 21 June 2010

  • EGit

    15Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    EGit

    • Builds upon JGit (Java library for manipulating Git)• Both transferred to Eclipse.org under EGit• JGit has special dispensation to be EDL• EGit is regular EPL• Both can be shipped as part of Eclipse• EGit 0.8 released with Helios

    16Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    EGit 0.8 Status

    • EGit 0.8 was released in time for Helios• Full compatibility with git command line tools• Commit (and commit amends)• Pull from and push to remote repositories• Comparison of individual files against history

    17Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    EGit 0.8 Status

    • EGit 0.8 is not feature complete• .gitignore support missing (for non-derived files)• Non-fast-forward merges not implemented• Rebasing not implemented• EGit 0.8 is ready for Git users who know the CLI• Team GUI-only users should wait for 0.9

    18Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Fast-forward merges

    1eb242 ac390b(1eb242)

    0249bc(ac390b)

    HEAD

    used by git pullwhen updatingto latest version

    19Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Non- fast-forward

    1eb242 ac390b(1eb242)

    0249bc(ac390b)

    HEAD

    used by git pullwhen merging two

    or more nodes

    793f12(1eb242)

    93r2d2(793f12,ac390b)

    20Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Rebase

    1eb242 ac390b(1eb242)

    0249bc(ac390b)

    HEAD

    used by git pullwhen merging two

    or more nodes

    793f12(1eb242)

    1492ad(0249bc)

    21Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Rebase - squash

    1eb242 ac390b(1eb242)

    0249bc(ac390b)

    HEAD

    used to concatenate multiple small

    commits into one larger commit

    2012ad(0249bc)

    a54001(1eb242)

    22Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    EGit future

    • EGit 0.9 due to be released in September 2010• Separate update site, like Mylyn• Can use 0.9+ with Helios later this year• May have EGit 0.10+ as well• EGit 1.0 planned for release as part of Indigo• Will be fully featured replacement for SVN/CVS

    23Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Git at Eclipse

    • http://dev.eclipse.org/git/index.html tracks CVS• Read-only copies kept up-to-date• Can checkout with git:// or http://• http://git.eclipse.org/ hosts live Eclipse Git repos• Virgo, Mylyn Review, ScalaModules, SWTBot• EGit/JGit developed at http://egit.eclipse.org

    24Monday, 21 June 2010

    http://dev.eclipse.org/git/index.htmlhttp://dev.eclipse.org/git/index.htmlhttp://git.eclipse.orghttp://git.eclipse.orghttp://egit.eclipse.orghttp://egit.eclipse.org

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Other git tools

    • Gerrit• Gerrit is an on-line review/commit tool for Git• Used by Android and EGit/JGit• GitHub• Public git repository hosting provider• Provides SVN and CVS access for Git repos

    25Monday, 21 June 2010

  • EGit Demo

    26Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt27Monday, 21 June 2010

  • Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

    Summary

    • DVCS are the future• Git is generally considered the fastest DVCS• EGit will ship with Helios• Some Eclipse projects already use Git• EGit, Virgo, MarketPlaceClient, ScalaModules• Others are looking to convert in Indigo timeline

    28Monday, 21 June 2010