Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git submodule

Git submodule

975ff6c8166f6f32889f004a904ffa39?s=128

Oursky Limited

December 15, 2014
Tweet

Transcript

  1. Git submodule Android as an example Dec 2014, Rick Mak

  2. Situation • I want to do a Swipe menu on

    Android • I find a repos do what I want at Github • But the repos don’t publish on maven (or other hosted package management platform) • Or want to use a specific fork/commit
  3. One of the solution • Copy the project into libs

    or SupportProjects • Copy the jar
  4. Pros and cons • git clone and go • Accessible

    and can easily modify the plugins • Mixed up lib and App code • Difficult to update the library
  5. Use git submodule • Smaller main repos • Maintain the

    reusability of the module • Separation of concern, Application vs module • Contribute back of Open Source project • Upgrade of module become easy
  6. How submodule look like

  7. Actual usage • git clone git@github.com:oursky/project.git • Add • git

    submodule add Path git@github.com:oursky/module.git • Checkout • git submodule update --init --recursive
  8. How many travis script we have now?

  9. Idiom • Fork to oursky • Branch by project name