Presentation is loading. Please wait.

Presentation is loading. Please wait.

Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole.

Similar presentations


Presentation on theme: "Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole."— Presentation transcript:

1 Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS 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

5

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

7 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”

8 First-time user setup Important $ git config --global user.name “csherwood (ubuntu)“ $ git config --global user.email csherwood@usgs.gov Optional $ git config --global core.editor xemacs $ git config --global merge.tool meld Check settings $ git config --list Modified after “Pro Git”

9 Centralized Repository From “Pro Git”

10 Distributed Repositories From “Pro Git”

11 ROMS and CSTMS SVN CSTMS trunk crs branch dev3 branch dev2 branch ROMS trunk crs branch working copy crs trunk working copy Hernan trunk working copy svn copy svn checkout svn update svn commit svn checkout svn update ? ? ?

12 COAWST GIT crs origin/master COAWST origin/master crs master sed branch track kumar branch Warner master track kumar branch track crs branch... git fetch git pull git push git clone kumar origin/master kumar master wec branch git pull git push git fetch

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

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

15 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

16 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

17 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….


Download ppt "Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole."

Similar presentations


Ads by Google