28
Git GitHub Hub for Geographers for Geographers @jgravois @patrickarlt slides: http://bit.ly/2oSd7Wx

f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

GitGitHub Hub for Geographersfor Geographers@jgravois

@patrickarlt

slides: http://bit.ly/2oSd7Wx

Page 2: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

How is this going to work?How is this going to work?1. code2. A brief introduction3. In situ demo

Page 3: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

what what isis GitHub? GitHub?(hint: it ends with ).com

Page 4: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

�le hostingchange archivingcommunication tool

Page 5: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

what what isis Git? Git?distributed version control

similar to replicated SDE versioning

Page 6: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

lets get collaborating!lets get collaborating!

Page 7: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

pat �nds a cool pat �nds a cool project projectopen sourceopen sourcehttps://github.com/jgravois/sandbox

GitHub: Fork A Repo

Page 8: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

pat creates his own pat creates his own of the of theprojectproject

forkfork

another repo hosted on github.com

git is distributed, each repo is a node in the graph

Page 9: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

pat pat clonesclones the repository the repositorycopys it onto his computer

git clone https://github.com/patrickarlt/sandbox.git

this creates another repo on pat's computer, another node in the graph

Page 10: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

pat creates a pat creates a branchbranchto store his own work

git checkout -b updates

Branches in a NutshellBasic Branching and MergingAtlassian: Using BranchesUnderstanding the GitHub Flow

Page 11: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

pat pat commitscommits in the new branch in the new branchto save his edits

git commit -am "update friends.geojson"

Page 12: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

pat pat pushespushes the branch up to his fork the branch up to his forkgit push origin updates

Page 13: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

then pat creates a then pat creates a pull requestpull requestto propose that john incorporate his work too

Creating a pull requestUnderstanding the GitHub Flow

Page 14: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

john john mergesmerges the pull request! the pull request!

Page 15: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

john makes his own commit directlyjohn makes his own commit directlyin GitHubin GitHub

Page 16: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

pat creates another pat creates another branchbranchto store more edits

git checkout -b more-updates

Page 17: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

and opens another pull requestand opens another pull request

Page 18: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

merge con�ict!merge con�ict!john edited the same line of the same �le

Resolve merge con�ict w/ command lineResolve merge con�ict on GitHub

Page 19: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

so pat so pat pullspulls from upstream from upstreamand resolves the con�ict manually

git pull upsteam master

Page 20: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

john has a suggestion for patjohn has a suggestion for pat

Page 21: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

so john uses github.com to make anso john uses github.com to make anedit of his ownedit of his own

Page 22: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

and opens a pull request for pat toand opens a pull request for pat toreviewreview

Page 23: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

lets lets it itwhiteboardwhiteboard

Page 24: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

teamwork makes the teamwork makes the dream workdream work!!

Page 26: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

please, please, please �ll out a session survey

1. download the Esri Events App2. select Dev Summit3. search for "Git/GitHub for Geographers"4. leave feedback!

Page 27: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the

idea, question, issue, or success story?

/ @geogangster @patrickarlt

Slides: http://bit.ly/2oSd7Wx

Page 28: f o r G eo g raphers - Esri...git checkout -b updates Branches in a Nutshell Basic Branching and Merging Atlassian: Using Branches Understanding the GitHub Flow pat com mits in the