<<

Esri Open Source Projects on GitHub Johnny Björk GitHub What is GitHub? Little Background

• Cloud-based platform for building, collaborating and managing open source projects • Built on Git • 11+ million projects • 3.5+ million developers What is GitHub? Little Background

• Cloud-based platform for building, collaborating and managing open source projects • Built on Git • 11+ million projects • 3.5+ million developers

DevSum Chris Wanstrath Why Git/GitHub?

• DVCS (Distributed Version Control System) • Full copy distribution • Branching, merging, issues, wiki • Strong community GitHub and Open Source

• Freely - Access - Use - Contribute - Distribute

GitHub is a vehicle; a very popular one.

A GitHub Components

• GitHub.com (in the cloud) - Search, watch, star, notifications, issues, wiki, gist - Dashboards - activity, repos, contributions… - User accounts - Organization • GitHub Clients - GitHub for Mac or Windows - Git – command-line What can you publish?

• Typical • Other - Code - City data - Documents - Travel logs - Slide presentations - Music - content - Recipes - GeoJSON - Blogs/Campaigns - Legal docs - Government… .com Esri Open Source Projects Esri Organization github.com/esri Esri Organization esri.github.com Esri Projects Project Types

• Products • Apps and Samples • Templates and Frameworks • Geo Tools • Industry and Government ArcGIS Products

-flex-viewer • arcgis-flex-viewer-builder • arcgis-osm-editor • arcgis-dijit-geocoder-js Apps and Samples

• quickstart-map-js • maps-app-android • sencha-touch-map-checkin-js • driving-directions- • arcgis-samples-winstore Templates and Frameworks

• bootstrap-map-js • -storytelling-template-js • social-media-map-template-js • 3d-cities-template • spatial-framework-for-hadoop Geo Tools

• esri-leaflet • Terraformers • geoportal-server • gis-tools-for-hadoop • geometry--java • node-geoservices-adaptor/koop • geoservices-js Industry and Government

• my-government-services • executive-dashboard • park-and-recreation-finder • citizen-service-request Project Activity

• 450+ developers • 140+ projects github.com/esri esri.github.com GitHub Workflow Getting Started

1. Fork

4. Pull Request Upstream/ Your Fork Master

3. Push 2. Clone 5. Pull Merge

Your Clone Getting Started – Homework Assignment!

1. Create a GitHub.com account 2. Install a GitHub client (and Git) - windows.github.com - mac.github.com

Resources • Doc, videos, ref - git-scm.com • Top Git Commands - gitref.org • Markdown - daringfireball.net/projects/markdown/syntax • Tutorial - http://try.github.com help.github.com You will do one of the following:

1. Get (steal) Code 2. Contribute Code 3. Create a New Project GitHub Work-flow

1. Fork 1. Fork

4. Pull Request 2. Clone Upstream/ Your Fork --- Local commits --- Master 3. Pull/Merge 3. Push 2. Clone 4. Push 5. Pull Merge 5. Pull Request Your Clone The first thing you’ll do… Get Code

1. Fork 1. Fork: Cloud copy

4. Pull Request 2. Clone: Local copy Upstream/ Your Fork Master

3. Push 2. Clone 5. Pull Merge

Your Clone

$ git clone https://github.com/alaframboise/quickstart-mapjs.git Make Local Commits

1. Fork • Add changes to the index

4. Pull Request • Store local edits Upstream/ Your Fork Master

3. Push 2. Clone 5. Pull Merge

Your Clone

--- Local commits ---

$ git add * ! $ git commit –m “These are my cool edits to code” Merge and Push Code

1. Fork • Create remote connection

4. Pull Request • Pull and merge edits Upstream/ Your Fork Master • Push to your cloud

3. Push 2. Clone 5. Pull Merge Tip: Always merge before pushing Your Clone

$ git add remote upstream https://github.com/Esri/quickstart-map-js.git! $ git pull upstream master! $ git push origin master! The second thing you’ll do… Pull Request

1. Fork • Request to accept

4. Pull Request • Specify branch Upstream/ Your Fork Master • Ensure can merge

3. Push 2. Clone 5. Pull Merge Tip: Use web client! Your Clone The third thing you’ll do… New Project

1. Fork • Create

4. Pull Request • Publish Upstream/ Your Fork Master • Push • Pull/Merge Push Pull 2. Clone Merge

Your Clone

$ git init (or create on GitHub and $git clone …)! $ git add *! $ git commit “My awesome project”! $ git push master If you’re cool, you’ll also… Publish Documentation

1. Fork • README.md

4. Pull Request • Use gh-pages Upstream/ Your Fork Master • Use wiki

Push Pull 2. Clone Merge

Your Clone

$ git checkout –b “gh-pages”! $ git push origin gh-pages! README.md

• Description • Features • Instructions • Requirements • Resources • Issues • Contributing • Licensing Final Notes

• Get on GitHub! • Check out the esri.github.com • Find a project • Follow a project • Create a project • Make a pull request • Join the community esri.github.com Understanding our world