1 / 17

Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole

Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole. Git documentation. Git - - distributed-is-the-new-centralized http://git-scm.com/doc Git for SVN users http://git-scm.com/course/svn.html “Pro Git ” – Scott Chacon (also online)

umay
Download Presentation

Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gotta get GitChris Sherwood and Alfredo AretxabaletaUSGS Woods Hole

  2. Git documentation • Git - - distributed-is-the-new-centralized http://git-scm.com/doc • Git for SVN users http://git-scm.com/course/svn.html • “Pro Git” – Scott Chacon (also online) • “Pragmatic Guide to Git” – Travis Swicegood • CRS attempts http://csherwood.tiddlyspot.com/

  3. Advantages • Designed for distributed development • All local repos are complete • Anybody can make a local archive • You can pull from any archive you have access to • Most operations are local (faster, work offline) • Integrity: everything is check-summed • Only adds data (maybe safer) • Lightweight, local branches • GUI tools and hosting services similar SVN

  4. Disadvantages • A(nother) learning curve • Sometimes TM(U)I • Also, sometimes too much typing

  5. Installation • Linux, Cygwin often have git, but if not: $ sudo apt-get install git-core • Mac can get it via MacPorts $ sudo port install git-core +svn +doc +bash_completion +gitweb • Windows http://code.google.com/p/msysgit Modified after “Pro Git”

  6. First-time user setup Important $ gitconfig --global user.name “csherwood (ubuntu)“ $ gitconfig --global user.emailcsherwood@usgs.gov Optional $ gitconfig --global core.editorxemacs $ gitconfig --global merge.tool meld Check settings $ gitconfig --list Modified after “Pro Git”

  7. Centralized Repository From “Pro Git”

  8. Distributed Repositories From “Pro Git”

  9. ROMS and CSTMS SVN ? CSTMS trunk ROMS trunk svn copy crs branch dev2 branch svn checkoutsvn updatesvn commit dev3 branch svn checkoutsvn updatesvn commit svn checkoutsvn update Hernan trunkworking copy crs trunkworking copy ? ? crs branchworking copy

  10. COAWST GIT COAWST origin/master git clone crsorigin/master kumarorigin/master git pullgit push git fetch git pullgit push git pullgit push git fetch git fetch Warnermaster track kumar branch track crs branch... crs master sed branchtrack kumar branch kumar masterwec branch

  11. Branch Development Arrows point back to snapshots seds waves Modified after “Pro Git”

  12. First attempt • Check out copy COAWST from SVN • Export from SVN to gcoawst • In gcoawst gitinit gitadd * git commit • Make a bare repository (no working dir) git clone --bare gcoawstgcoawst.git scp –r gcoawst.git csherwood@peach.whoi.edu:/peach/data2/csherwood/src/gcoawst.git

  13. First attempt, second page • crs cloned it • ala cloned it • ala made a branch and switched to it • ala added the new sediment stuff to the branch and committed it • crs made a branch that tracked ala’s repo • crs fetched ala’s changes • crs merged them into his master • crs pushed them up to the repository • new users can clone/pull new sediment stuff from the repository

  14. A few things we could not have done with SVN • Made our own shared repository based on the source repo (without admin) • Merged Alfredo’s branch into my branch without going to a repo • Its faster… • …but confusing

  15. If we wanted to try it… • Pick a stopping point…maybe make a tagged SVN release • Use the tools to port the SVN history to git • Let John work on it for a while, allowing people to clone it • Pick a project to track, and work out the protocol for tracking branches • Hey, if Linus Torvalds can do it….

More Related