SlideShare a Scribd company logo
Source Code Management
Campus LISA
July 9, 2014
Matt Critchlow
Manager of Development and Web Services
Questions
• Who is using a version control system in their current
position?
• Who is using Github, either personally or professionally?
• Who develops code entirely on their own?
Background
• UC San Diego Library Development Team
• 6 Developers
• Open-Source repositories: 3
• Internal repositories: 46
Version Control
Source: http://git-scm.com, http://github.com, http://atlassian.com/software/stash
Github
• Social Coding – 6 mil+ people
• Collaboration with community projects
– https://github.com/projecthydra
– https://github.com/projectblacklight/
– https://github.com/fcrepo4
• Best Practices are inherited
Stash
• Internal Projects
• Git under the hood
• User interface similar to Github
• JIRA Integration
Git Flow
Source: http://nvie.com/posts/a-successful-git-branching-model/
Git Flow: Primary Branches
Source: http://nvie.com/posts/a-successful-git-branching-model/
Git Flow Git Extensions
Source: https://github.com/nvie/gitflow
Git Flow: New Feature
Source: http://nvie.com/posts/a-successful-git-branching-model/
Git Flow: Release
Git Flow: OH CRAP!
Source: http://nvie.com/posts/a-successful-git-branching-model/
Other Workflows
• Git Tags and Branches
• Spencer and Tom’s workflows
• Subversion has equivalents
• Goal: Consistent workflow that works for your team
References
Library on Github: https://github.com/ucsdlib/
Git Flow: https://github.com/nvie/gitflow
Atlassian Stash: https://www.atlassian.com/software/stash
Contact: @mattcritchlow, mcritchlow@ucsd.edu

More Related Content

PPTX
PDF
GitHub Workflows for Technical Communication
PDF
GitHub
PDF
Digital Fabrication Studio v.0.2: Version Control System: Files
KEY
GR8CONF Contributing Back To Grails
PDF
Git workshop
PDF
The Open Container Initiative (OCI) at 12 months
PDF
Getting started with GitHub
GitHub Workflows for Technical Communication
GitHub
Digital Fabrication Studio v.0.2: Version Control System: Files
GR8CONF Contributing Back To Grails
Git workshop
The Open Container Initiative (OCI) at 12 months
Getting started with GitHub

What's hot (20)

PDF
Hacktoberfest 2020
PDF
Open Source Lessons from the TODO Group
PDF
Bits+atoms+processes: the influence of code culture on Design @ Cumulus Helsi...
PDF
Open source, What | Why | How
PPTX
Let's Git Together! - Hacktoberfest 2020
ODP
Development Process, the XWiki way
PPTX
Smile Gupta - Hacktoberfest Celebration 2020
PPTX
Git version control
PDF
Gitlabのイシュートラッカー活用術
PDF
Advanced GitHub Enterprise Administration
PPTX
Hacktoberfest 2020 - Open source for beginners
PPTX
Introduction to Github for Team Project
PDF
Global Open Source Development 2011-2014 Review and 2015 Forecast
PPTX
Hacktoberfest slides
PPTX
Github PowerPoint Final
PDF
Contributing to Open Source #Hacktoberfest
PPTX
Guide to open source
PDF
認識開源社群運作
PPTX
EMOCON 2015 - HAL with Swagger
PDF
Introduction of Open Source Job Board with Drupal CMS
Hacktoberfest 2020
Open Source Lessons from the TODO Group
Bits+atoms+processes: the influence of code culture on Design @ Cumulus Helsi...
Open source, What | Why | How
Let's Git Together! - Hacktoberfest 2020
Development Process, the XWiki way
Smile Gupta - Hacktoberfest Celebration 2020
Git version control
Gitlabのイシュートラッカー活用術
Advanced GitHub Enterprise Administration
Hacktoberfest 2020 - Open source for beginners
Introduction to Github for Team Project
Global Open Source Development 2011-2014 Review and 2015 Forecast
Hacktoberfest slides
Github PowerPoint Final
Contributing to Open Source #Hacktoberfest
Guide to open source
認識開源社群運作
EMOCON 2015 - HAL with Swagger
Introduction of Open Source Job Board with Drupal CMS
Ad

Similar to UC San Diego Campus LISA 2014 - Source Code Management (20)

PDF
Developing XWiki
PDF
Leading a Community-Driven Open Source Project
PDF
2019-04-17 Bio-IT World G Suite-Jira Cloud Sample Tracking
PDF
Create great cncf user base from lessons learned from other open source com...
PDF
Open Chemistry: Input Preparation, Data Visualization & Analysis
PPT
Freelancer Weapons of mass productivity
PDF
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...
PPTX
Hydra Project Management Survey
PDF
04. Open Source Development Platforms.pdf
PDF
Ready? Bootstrap! Go! (CFUG Belgium 24 04-2012)
ODP
Unicon June 2014 IAM Briefing
PDF
Git & GitHub N00bs
PPTX
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
PPTX
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
KEY
S2GX 2012 - Spring Projects Infrastructure
PDF
Spring Projects Infrastructure
PDF
Agile Secure Cloud Application Development Management
PDF
Europace's journey to InnerSource
PDF
Git for folk who like GUIs
PPSX
Hackaton for health 2015 - Sharing the Code we Make
Developing XWiki
Leading a Community-Driven Open Source Project
2019-04-17 Bio-IT World G Suite-Jira Cloud Sample Tracking
Create great cncf user base from lessons learned from other open source com...
Open Chemistry: Input Preparation, Data Visualization & Analysis
Freelancer Weapons of mass productivity
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...
Hydra Project Management Survey
04. Open Source Development Platforms.pdf
Ready? Bootstrap! Go! (CFUG Belgium 24 04-2012)
Unicon June 2014 IAM Briefing
Git & GitHub N00bs
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
S2GX 2012 - Spring Projects Infrastructure
Spring Projects Infrastructure
Agile Secure Cloud Application Development Management
Europace's journey to InnerSource
Git for folk who like GUIs
Hackaton for health 2015 - Sharing the Code we Make
Ad

Recently uploaded (20)

PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation theory and applications.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
Teaching material agriculture food technology
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Electronic commerce courselecture one. Pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A comparative analysis of optical character recognition models for extracting...
MYSQL Presentation for SQL database connectivity
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
Electronic commerce courselecture one. Pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
sap open course for s4hana steps from ECC to s4
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools

UC San Diego Campus LISA 2014 - Source Code Management

Editor's Notes

  • #2: I’m Matt Critchlow and I’m the manager of Development and Web Services for the UC San Diego Library I manage a team of 6 developers who work on various projects ranging from website design and development to ruby and java web applications I’m going to focus my part of this session on how we’re using Git for our version control system, and how it’s incorporated into our development and release workflow
  • #3: But first, I’d like to ask a few questions, to gauge where we are with the folks in the room So…
  • #4: So, to answer some of those questions from our end. As I said our development team has 6 developers, so while some projects may have leads there is no isolation At the moment we have 3 open source repositories And we have 46 internal repositories
  • #5: So as a result, while we use Git for every code repository, we have two systems for managing those repositories We use Atlassian’s Stash for managing our internal repositories And we use Github for our open source projects that can be made publicly available.
  • #6: So why Github? It is the open source development standard. It is the world’s largest code host with over 6 million users. It’s pretty amazing. There is a lot to be gained by working out in the open. Opportunity to create a bigger “team” than you have locally In the Library, we’re building our new Digital Asset Management System on top of an open source framework called Project Hydra. It, in turn, depends on a number of other open source projects We’re also contributing development time directly to a critical component of the Hydra architecture, namely the Fedora repository layer. The way we’re looking at this goes back to the statement “If you want to go fast, go alone. If you want to go far, go together” In the Hydra project, we’re working with over 20 partners ranging from Stanford, Notre Dame and other universities, to groups like WGBH Boston and the Rock and Roll Hall of Fame. All told, that’s a team of dozens of developers working together on the core underlying framework that we’re all leveraging. So we are big fans of Github, but as you saw, only a few of our projects are on Github, the rest are in either private Github repositories or in Atlassian Stash
  • #7: Stash runs on your own internal servers, behind your firewall. Stash runs on Git. If most of the goodies of the Github UI such as Pull Requests with in-line code comments, auto-merging, etc. that facilitate Code Review and team collaboration. I’ll talk a bit more about how we do that on the next few slides.. You don’t get things like Gists, which we use often in Github. But that may not be an issue for you. Also, if you happen to use JIRA, as we do, there is even more integration in how you manage JIRA tickets with Pull Requests and Commits. I think Tom will talk about that more in his demo, so I’ll leave it at that.
  • #8: So regardless of whether we’re working on a repository in Stash or on Github, our team has been using the Git Flow If you can’t read this, I apologize, but if you search for Git flow in google, the blog post that contains this image should be your first hit. We use git flow for managing our day to day code development workflow, and it is integrated into our CI and release management workflow as well So I’m going to walk through a few examples of how we use Git flow, but first I’ll note two things. In Git flow, there are two primary code branches that always exist for your project, develop and master.
  • #9: Master should always reflect what is your current production-ready state. Active development never happens on this branch. Master should be “clean”. If something is merged into master, that is a release. The Develop branch is where integration happens. This is where continuous integration builds happen for the development environment. We have our CI system, Atlassian’s Bamboo product, respond to commits to the remote develop branch by automatically deploying to the development environment
  • #10: Before talking about the rest of Git Flow, I want to mention that there is a project on github that adds a number of git extensions that allow the examples I’m about to describe to be managed with single commands, rather than a a set of commands. Installation is shown on the link provided, and then if you want to initiate git flow for a particular project, you navigate to the project’s main folder and type git flow init –d. The –d command uses all the defaults, but you can leave it out if you want to walk through the process yourself. The screenshot here lists the available subcommands for managing the workflow OK, let’s get to the supporting branches and how they fit into this.
  • #11: The first is a feature branch. The primary idea here, is that new features should be developed in isolation from the develop branch to keep the develop branch stable. Features are generally large enough efforts that they are going to take a significant amount time. We don’t know when they’ll be done, and we don’t want them to break anything. So on the right you can see how this works graphically. On the left, you can see how the branch is created and managed. In this example, I’m working in a dashboard project, and I want to create a new widget. So I invoke the git flow subcommand on the left which does a few things. It creates a new feature branch using the name I provide and bases this branch of what is currently the most up-to-date version of the develop branch. Then is checks out that branch automatically for me, so I can start work on my feature in isolation. After making a number of commits and feeling confident the feature is working as expected, one can run the command lists in the terminal screenshot to finish the feature branch. This does a few things. It merges the feature back into the develop branch. If any merge conficts arise, you’ll be prompted to resolve them. Then the feature branch is deleted automatically, since the entire commit history now exists in the develop branch. We generally do a slight variation on this with our team. We have developers create Pull Requests, rather than merge their feature branch into the develop branch on their own. Another developer is then assigned to review the Pull Requests and either accept or reject it. I’m happy to talk more about that process if anyone is interested.
  • #12: When it’s time for a release, a release branch is created. Generally named with the version number you intend to release. Like a feature branch, this creates a branch off of the develop branch and checks out that branch automatically A developer can then push that release branch to a remote git branch We have our Altassian Bamboo CI server setup to look for new remote branches with the release/ prefix, and if it encounters one, it automatically builds and deploys that release to our test environment. Our Product Owner, and other stakeholders, generally review the release and verify whether the release can be deployed to production. If the release is approved, the developer can run the release finish command, which will do a number of things. It will attempt to merge the release branch into both the develop branch and the master branch. It merges into the develop branch to make sure it is up do date with any changes made to the release branch are preserved It merges into the master branch as a signal that a new release should be deployed to production off of master Then the release branch, again, is safely deleted I do want to note that while we could have a similar trigger for production as we do for our test enviornment deployments, we choose to have our Operations group manually handle deploying our applications to production. This is a separation of responsibility that we’re all comfortable with for now, but it’s worth noting that you could absolutely use a system like Bamboo, Travis, or Jenkins to deploy automatically to production for you
  • #13: The last supporting branch is the hotfix, or the oh crap something leaked into production and we need to fix it yesterday branch This is invoked with in the same command pattern as the release and feature branches. So I won’t show that again here. The key differences are the following: When the hotfix branch is created, it is branched off of master When the hotfix branch is finished, it merges into both master and develop I’m happy to report that we’ve rarely ever needed to use this, as I think this workflow as a whole in with a solid test suite help avoid unseen bugs of this magnitude, stuff does happen. And this is a nice mechanism for addressing it
  • #14: So while git flow has worked well for us, it’s certainly not the only option if you’re using Git. Using tags in git, with some combination of separate branches can give you the same flexibility and safety that git flow provides Subversion of course has equivalents to this workflow as well, with it’s own options The goal should really be to have a consistent workflow that works for your team and the technology stack your working with And I’d be very interested to hear what the rest of you are doing, what you like about it, what you don’t and what we might be able to learn from each other.
  • #15: - So thanks for listening, here are a few additional links