SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
SOURCE CODE
MANAGEMENT HARMONY
Git & Github for Sony Teams
Image from: http://en.wikipedia.org/wiki/File:Clingmans-dome-spruce-fir-tn1.jpg
THE COMPONENTS
Git | Github | Team Process
Image from: http://farm6.staticflickr.com/5446/9195568635_a2f407dc97_o.jpg
THE COMPONENTS
1. The command line interface
• clone, checkout, push, merge, fetch, config, et al
2. The network communication
• local: /opt/git/project.git or file:///opt/git/project.git
• https: http://example.com/gitproject.git
• ssh:ssh://user@server/project.git
• git: git://server/project.git
THE COMPONENTS
Github
Many people think
these are part of git
itself because Github
is how they learn
about git
1. Pull Requests
• A Github idiom for merging from a branch or another repo
2. Forking
• Cloning a repo under a user or organization name
3. Code viewing and commenting
• Comment on specific lines of code
• View excellent visual diffs
• Emoji
4. Integrations
• Travis CI, et al
• The following important processes are much less common in
teams using SVN
1. Branching per task / small branches
2. Reviewing and fixing code in detail prior to commits to
master
3. Tight integration of SCM into project management
(PM) & bug management tools
4. Full team engagement in code process. Including
designers, PMs, senior managers etc. Github is so
visual that engagement is higher.
GIT + GITHUB
Reasons Using git + Github is Necessary
• Flexibility
1. More network protocols
2. SVN integration for people reluctant to learn git
3. Far more integration options
4. Nearly all respectable projects use git
• Speed & Agility
1. The process can match the agile team style
2. Code reviews can be done asynchronously
3. Branches are small and review of only 2 team
members is required so leviathan code reviews that
take up everyone’s time are no longer required
GIT + GITHUB
Reasons Using git + Github is Necessary
THE COMPONENTS
Team Process
1. Standards are clear
2. Fewer team arguments, greater team harmony
3. Code reviews are more structured, more consistent and less
hurtful to the person being reviewed
4. Code quality and consistency is greatly increased
5. Cooperation in large organizations is easier
6. Cooperation in cross-functional teams is easier
TEAM PROCESS
Reasons Team Process is Necessary
1. When do you open a pull request (PR)?
2. When do you fork, tag or branch?
3. What code formatting tools must be run prior to a commit?
4. What are the team guidelines for code consistency?
5. How many team members must review each PR?
6. What officially signifies approval of a PR?
7. What level of code coverage is required for a merge?
8. Who is responsible for the merge (committer/reviewer)?
9. What happens when someone breaks the build?
TEAM PROCESS
Questions Team Process Answers
TEAM PROCESS
The Actual Process & Guidelines
Image from: http://farm8.staticflickr.com/7245/7344779672_f6fbc90949_o.jpg
1. Each task within your PM tool results in a branch
2. Each bug fix results in a branch
3. You fork (instead of branch) when you are contributing to
code created by someone in a different team/organization
4. You tag when a release has been approved by QA & your PM
5. Tags follow the semantic versioning policy (http://
semver.org)
6. Code consistency/quality tools agreed upon by the team
must be run before every commit that hits the server. Local
commits are up to your discretion
TEAM PROCESS
The Actual Process & Guidelines
7. Branch name format: IDFromPMTool_branch_purpose
8. Commit messages must be in imperative form and be less
than 72 characters long
9. Your commit history must be rebased before pushing to a
remote branch.You should generally squash commits of
fixing minor mistakes, reverting code etc. Make your
commit history easy to read and concise
10. Code that violates code formatting standards cannot be
merged, no exceptions unless there is a truly good reason
and comment is left in the code documenting why
TEAM PROCESS
The Actual Process & Guidelines
11. Two team members should look at any PR where the LoC
changed is greater than 6
12. Only one team member needs to approve a PR.They
approve a PR by using the :shipit: emoji or a variation
thereof
13. The person who presses merge is responsible for the quality
of the PR
14. Tests must be written for each module added
15. Tests must be run, automated, on each commit to a branch
TEAM PROCESS
The Actual Process & Guidelines
:SHIPIT:
http://www.quora.com/GitHub/What-is-the-significance-of-the-Ship-It-squirrel
http://shipitsquirrel.github.io
http://www.emoji-cheat-sheet.com
16. When someone breaks the master branch, they need to be
punished in some fashion.This is up to the team to decide
TEAM PROCESS
The Actual Process & Guidelines
TEAM PROCESS
Example Process Timeline
Image from: http://farm8.staticflickr.com/7245/7344779672_f6fbc90949_o.jpg
1. Team member receives a task for refactoring an album view,
with the ID in Rally (PM tool) of TA306
2. …pulls latest from master: git pull master
3. …creates branch TA306_album_view_refactor off of
master: git checkout -b TA306_album_view_refactor
4. …pushes branch name to remote repo: git push origin
TA306_album_view_refactor
5. Team member sets local branch to track origin: git branch —
set-upstream-to=origin/TA306_album_view_refactor
TA306_album_view_refactor
TEAM PROCESS
Example Process Timeline
6. …creates several local commits without pushing to origin
7. …pulls master back in: git checkout master && git pull &&
git checkout TA306_album_view_refactor && git merge
(resolving any conflicts that arise)
8. …runs `git rebase -i` to choose which commits to keep
history for and which to squash
9. …runs git push origin TA306_album_view_refactor
10. …goes to Github and compares
TA306_album_view_refactor to master, ensuring there
aren’t any mistakes
TEAM PROCESS
Example Process Timeline
11. …opens a pull request and notifies his/her team
12. …1 or 2 team members reviews the code against team
guidelines and their experience, and runs the code locally to
verify it works
13. …responds to any feedback on the PR by either changing
the code or coming to an agreement with the reviewer(s)
that it should not be changed
14. …once all feedback is addressed, the main reviewer will
post a :shipit:. If the committer is done, one of the reviewers
then merges the branch into master and deletes the branch
TEAM PROCESS
Example Process Timeline

Más contenido relacionado

La actualidad más candente

La actualidad más candente (11)

Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
 
How do you implement Continuous Delivery? Part 3: All about Pipelines
How do you implement Continuous Delivery? Part 3: All about PipelinesHow do you implement Continuous Delivery? Part 3: All about Pipelines
How do you implement Continuous Delivery? Part 3: All about Pipelines
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
How we git - commit policy and code review
How we git - commit policy and code reviewHow we git - commit policy and code review
How we git - commit policy and code review
 
Refactoring to GO modules
Refactoring to GO modulesRefactoring to GO modules
Refactoring to GO modules
 
Becoming a Plumber: Building Deployment Pipelines - All Day DevOps
Becoming a Plumber: Building Deployment Pipelines - All Day DevOpsBecoming a Plumber: Building Deployment Pipelines - All Day DevOps
Becoming a Plumber: Building Deployment Pipelines - All Day DevOps
 
Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)
 
Git flow workflow example
Git flow workflow exampleGit flow workflow example
Git flow workflow example
 
Automated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 DevelopmentAutomated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 Development
 

Similar a SCM Harmony: git & Github for Sony Teams

Similar a SCM Harmony: git & Github for Sony Teams (20)

Git collaboration
Git collaborationGit collaboration
Git collaboration
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Introduction to git & github
Introduction to git & githubIntroduction to git & github
Introduction to git & github
 
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
Mobile Apps CI
Mobile Apps CIMobile Apps CI
Mobile Apps CI
 
Introduction to Git (part 3)
Introduction to Git (part 3)Introduction to Git (part 3)
Introduction to Git (part 3)
 
Git workshop
Git workshopGit workshop
Git workshop
 
Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015
 
Deploy Application Files with Git
Deploy Application Files with GitDeploy Application Files with Git
Deploy Application Files with Git
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
 
S3 Group on Code Management - RDK Users Conference 2014
S3 Group on Code Management - RDK Users Conference 2014S3 Group on Code Management - RDK Users Conference 2014
S3 Group on Code Management - RDK Users Conference 2014
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club Milano
 
Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 
Git introduction
Git introductionGit introduction
Git introduction
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Make
 

Último

VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Último (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 

SCM Harmony: git & Github for Sony Teams

  • 1. SOURCE CODE MANAGEMENT HARMONY Git & Github for Sony Teams Image from: http://en.wikipedia.org/wiki/File:Clingmans-dome-spruce-fir-tn1.jpg
  • 2. THE COMPONENTS Git | Github | Team Process Image from: http://farm6.staticflickr.com/5446/9195568635_a2f407dc97_o.jpg
  • 4. 1. The command line interface • clone, checkout, push, merge, fetch, config, et al 2. The network communication • local: /opt/git/project.git or file:///opt/git/project.git • https: http://example.com/gitproject.git • ssh:ssh://user@server/project.git • git: git://server/project.git
  • 6. Many people think these are part of git itself because Github is how they learn about git 1. Pull Requests • A Github idiom for merging from a branch or another repo 2. Forking • Cloning a repo under a user or organization name 3. Code viewing and commenting • Comment on specific lines of code • View excellent visual diffs • Emoji 4. Integrations • Travis CI, et al
  • 7. • The following important processes are much less common in teams using SVN 1. Branching per task / small branches 2. Reviewing and fixing code in detail prior to commits to master 3. Tight integration of SCM into project management (PM) & bug management tools 4. Full team engagement in code process. Including designers, PMs, senior managers etc. Github is so visual that engagement is higher. GIT + GITHUB Reasons Using git + Github is Necessary
  • 8. • Flexibility 1. More network protocols 2. SVN integration for people reluctant to learn git 3. Far more integration options 4. Nearly all respectable projects use git • Speed & Agility 1. The process can match the agile team style 2. Code reviews can be done asynchronously 3. Branches are small and review of only 2 team members is required so leviathan code reviews that take up everyone’s time are no longer required GIT + GITHUB Reasons Using git + Github is Necessary
  • 10. 1. Standards are clear 2. Fewer team arguments, greater team harmony 3. Code reviews are more structured, more consistent and less hurtful to the person being reviewed 4. Code quality and consistency is greatly increased 5. Cooperation in large organizations is easier 6. Cooperation in cross-functional teams is easier TEAM PROCESS Reasons Team Process is Necessary
  • 11. 1. When do you open a pull request (PR)? 2. When do you fork, tag or branch? 3. What code formatting tools must be run prior to a commit? 4. What are the team guidelines for code consistency? 5. How many team members must review each PR? 6. What officially signifies approval of a PR? 7. What level of code coverage is required for a merge? 8. Who is responsible for the merge (committer/reviewer)? 9. What happens when someone breaks the build? TEAM PROCESS Questions Team Process Answers
  • 12. TEAM PROCESS The Actual Process & Guidelines Image from: http://farm8.staticflickr.com/7245/7344779672_f6fbc90949_o.jpg
  • 13. 1. Each task within your PM tool results in a branch 2. Each bug fix results in a branch 3. You fork (instead of branch) when you are contributing to code created by someone in a different team/organization 4. You tag when a release has been approved by QA & your PM 5. Tags follow the semantic versioning policy (http:// semver.org) 6. Code consistency/quality tools agreed upon by the team must be run before every commit that hits the server. Local commits are up to your discretion TEAM PROCESS The Actual Process & Guidelines
  • 14. 7. Branch name format: IDFromPMTool_branch_purpose 8. Commit messages must be in imperative form and be less than 72 characters long 9. Your commit history must be rebased before pushing to a remote branch.You should generally squash commits of fixing minor mistakes, reverting code etc. Make your commit history easy to read and concise 10. Code that violates code formatting standards cannot be merged, no exceptions unless there is a truly good reason and comment is left in the code documenting why TEAM PROCESS The Actual Process & Guidelines
  • 15. 11. Two team members should look at any PR where the LoC changed is greater than 6 12. Only one team member needs to approve a PR.They approve a PR by using the :shipit: emoji or a variation thereof 13. The person who presses merge is responsible for the quality of the PR 14. Tests must be written for each module added 15. Tests must be run, automated, on each commit to a branch TEAM PROCESS The Actual Process & Guidelines
  • 17. 16. When someone breaks the master branch, they need to be punished in some fashion.This is up to the team to decide TEAM PROCESS The Actual Process & Guidelines
  • 18. TEAM PROCESS Example Process Timeline Image from: http://farm8.staticflickr.com/7245/7344779672_f6fbc90949_o.jpg
  • 19. 1. Team member receives a task for refactoring an album view, with the ID in Rally (PM tool) of TA306 2. …pulls latest from master: git pull master 3. …creates branch TA306_album_view_refactor off of master: git checkout -b TA306_album_view_refactor 4. …pushes branch name to remote repo: git push origin TA306_album_view_refactor 5. Team member sets local branch to track origin: git branch — set-upstream-to=origin/TA306_album_view_refactor TA306_album_view_refactor TEAM PROCESS Example Process Timeline
  • 20. 6. …creates several local commits without pushing to origin 7. …pulls master back in: git checkout master && git pull && git checkout TA306_album_view_refactor && git merge (resolving any conflicts that arise) 8. …runs `git rebase -i` to choose which commits to keep history for and which to squash 9. …runs git push origin TA306_album_view_refactor 10. …goes to Github and compares TA306_album_view_refactor to master, ensuring there aren’t any mistakes TEAM PROCESS Example Process Timeline
  • 21. 11. …opens a pull request and notifies his/her team 12. …1 or 2 team members reviews the code against team guidelines and their experience, and runs the code locally to verify it works 13. …responds to any feedback on the PR by either changing the code or coming to an agreement with the reviewer(s) that it should not be changed 14. …once all feedback is addressed, the main reviewer will post a :shipit:. If the committer is done, one of the reviewers then merges the branch into master and deletes the branch TEAM PROCESS Example Process Timeline