SlideShare a Scribd company logo
Git Makes Me Angry Inside
Emma Jane Westby
Education Development Coordinator
Drupalize.Me
@emmajanehw
http://drupalize.me
Slides at: http://tinyurl.com/dcto13-git
Saturday, 13 July, 13
Problem: Developers face a steep learning curve when they choose to adopt version control.
Solution: There is a version control strategy to suit your workflow, even if you've always
thought it was too hard to bother.
Is your project folder filled with files like this: page.old.2.bak.php? Does Git make you angry
inside? Do you resent that everyone except you regularly visits the magical place referred to
as "The Command Line"? Are you afraid of the vagrant who stole your puppet? In this session
you will get a gentle introduction to working efficiently as a developer in small teams, or as a
solo developer. We'll focus on real world examples you can actually use to make your work
faster and more efficient.
Yes, this is an introductory session. This is for people who feel shame that they don't know
how to "just cd into yer root durrr" and get mad when people say "just diff me a patch" as if
it's something as easy as making a mai thai even though you have no rum. No, you don't have
to have git installed to attend. You don't even need to know where the command line is on
your computer.
Why Stick Around
• Learn how Git thinks, without being exposed to the command line.
• Learn how to structure your work flow to take advantage of Git.
• Learn how basic commands are applied to common work flow scenarios.
• Q&A / therapy session
Saturday, 13 July, 13
What’s your role?
Saturday, 13 July, 13
You need to start with the people....
What are your tasks?
download
work
create
snapshot
share
work
Saturday, 13 July, 13
What are the tasks that your team work on?
For example: download work, make changes, upload work to a shared space.
What’s your workflow?
Saturday, 13 July, 13
There are a lot of valid workflows.
What’s your branch management strategy?
Saturday, 13 July, 13
As your people are working together, they need to have private, and shared spaces to do
their work. This is where a branch management strategy gets layered in.
How do we make Git do that?
Git Shell, cross-platform
Saturday, 13 July, 13
We’re not going to talk about the specifics of how to run commands today. But these are a
few examples of the GUIs that are available for different platforms. (You don’t *have to be*
stuck on the command line if you don’t want to be.)
Before we get started: let’s take a second to find out who you are. Why are you here, and how
are you currently struggling with version control?
Git is 90% process and 10% technology.
• Git was written by kernel developers, for kernel developers. Chances are high
you’re not a kernel developer. Stop blaming yourself, and start blaming Git for
your struggles.
• Not all is lost! If you can diagram the problem you are trying to solve; you will
be able to find the right Git commands.
• Before we start drawing pictures, let’s take a look at some of the concepts
version control helps us with.
Saturday, 13 July, 13
Out of the box, Git does basically nothing for you. It’s your processes that will allow you to
apply the tools you need to make version control work for you.
Then go through each of the points listed.
Transition: let’s take a look at some of the terms you’ll run into when working with Git to give
us a shared language.
Version control (sort of) makes automation easier
• Backup and restore
• Synchronize across multiple platforms
• Short-term “undo” to test implications of changes
• Long-term “undo” to reverse bugs or regressions
• Track changes to see why/how software evolved
• Track ownership to give “credit” to change makers
• Sandbox code to test changes without affecting other people and systems
Saturday, 13 July, 13
There are a lot of valid reasons to use version control. The biggest gain bigger teams will see
is in automation of process. But you don’t need to automate things to take advantage of
version control.
Read through the list of things version control helps with.
Terminology: locations
• remote repository
• trunk or main
• head or tip
• local repository
• client
• working copy
Saturday, 13 July, 13
There are a lot of terms in version control. Creating a map of where things live can make the
documentation a lot easier to deal with.
Repo: database of changes to your files.
Server: computer storing the repo
Client: computer connecting to the repo
Working copy: local copy where changes are made
Trunk/main: The current, primary source for unchanged code
Head: the latest revision in a repository (tip: latest in a branch...HEAD moves, tip doesn’t).
Terminology: actions and tasks
Saturday, 13 July, 13
With our locations mapped out, let’s take a look at the common tasks or “actions” you can
take.
Basic actions:
adopt / download: clone, merge, fetch, checkout, pull/rebase
review: log, status
compare: diff HEAD, diff, diff --cached
reset: checkout, checkout HEAD, reset --hard (throw away in-between commits), revert (save
in-between commits)
save: add -u, commit, commit -a
distribute: push
Set the stage!
Before we can set our workflow we need to know who we’re dealing with and
what they’re supposed to be doing.
Saturday, 13 July, 13
People first. In this next section, we’ll start with the folks on your team (not the software).
Who’s on your code team?
Write down a list of all of the people on your code team. This list may
include:
• developers
• designers
• project managers
• clients
Saturday, 13 July, 13
Who are the folks on your team? Designer? Developer? Site builder?
Where do you fit in?
Maybe you do everything. Maybe you only do some things. Write a list of all
the tasks you are actually responsible for. This might include:
• Writing code.
• Reviewing code.
• Pushing tested code to the server.
• Fixing broken code.
Saturday, 13 July, 13
Slide is “as advertised”.
What are your tools and restraints?
Often there are other things we need to fit into our workflow. Create a third list
of any tools and restraints you are aware of. This list might include:
• Version control software (we’ll always assume Git)
• Code hosting system (Bitbucket, GitHub, self-hosted)
• Server ecosystem (dev / staging / live)
• Code editors & integrated developer environments (vim, Dreamweaver,
Sublime, PHPstorm)
• Automated testing systems or review “gates”
Saturday, 13 July, 13
Slide is “as advertised”.
What’s your workflow?
With the team members identified, it’s time to sketch out how these people
(ideally) work together.
Saturday, 13 July, 13
Now that we know the people, let’s talk about how they work together. There are lots of valid
ways of working together, let’s take a look at a few of them.
Solo developer workflow
Saturday, 13 July, 13
Solo dev workflow:
create project, add files, do work, upload files
Partner workflow with no central server
Saturday, 13 July, 13
James starts a grocery list; Emma already had a grocery list started so she asks to see James’s
list. She adds her items to James’s list and hands it back.
Centralized workflow with no local commits
Saturday, 13 July, 13
the “old” style of version control has a single place where all work is checked into. Every time
work is saved, it’s uploaded to the shared space. You can implement this workflow with
distributed version control too, but you wouldn’t want to.
Decentralized with human gatekeeper
Saturday, 13 July, 13
This is pretty typical: it’s a decentralized workflow. The developers pull/clone. Do their work
locally and then ask their “gatekeeper” to check their work and merge it into the central repo.
Once the central repo has the changes, the devs grab a fresh copy and continue their work.
Decentralized with automated gatekeeper
Saturday, 13 July, 13
The decentralized with automated gatekeeper is almost the same, except it’s a computer
making the decision on whether or not code should be accepted. This is fine for quantitative
reviews, but shouldn’t be used for qualitative reviews...unless there are pre-merge peer
reviews also happening.
Sketch out your workflow
• Identify the roles on your team.
• Identify the relationships between the team members.
• Draw arrows to show how code flows between team members.
Saturday, 13 July, 13
Slide is “as advertised”.
How will you manage your branches?
With the workflow described, it’s time to look at how the code will be
segregated into different branches.
Saturday, 13 July, 13
This is where the fun starts! Managing branches in a distributed workflow.
Popular strategies
• http://nvie.com/posts/a-
successful-git-branching-model
• http://scottchacon.com/
2011/08/31/github-flow.html
Saturday, 13 July, 13
Work flow and branch management
Saturday, 13 July, 13
Work flow and branch management
Saturday, 13 July, 13
Work flow and branch management
peer review
Saturday, 13 July, 13
Work flow and branch management
peer review
public / live
server
Saturday, 13 July, 13
Work flow and branch management
peer review
public / live
server
Saturday, 13 July, 13
Work flow and branch management
peer review
public / live
server
dev / testing
server
Saturday, 13 July, 13
Work flow and branch management
peer review
public / live
server
dev / testing
server
master
master
master
Saturday, 13 July, 13
Work flow and branch management
peer review
public / live
server
dev / testing
server
master
master
master
dev
dev
dev
Saturday, 13 July, 13
Work flow and branch management
feature feature
hotfix featur
peer review
public / live
server
dev / testing
server
master
master
master
dev
dev
dev
Saturday, 13 July, 13
Work flow and branch management
feature feature
hotfix featur
peer review
public / live
server
dev / testing
server
master
master
master
dev
dev
dev
Saturday, 13 July, 13
Sketch out your branch management strategy
• Identify the roles on your team.
• Identify the relationships between the team members.
• Draw arrows to show how code flows between team members.
• Time: 10 minutes
Saturday, 13 July, 13
Q&A + Git Therapy Session
Saturday, 13 July, 13
You can make Git do what you want...
now that you know what you want.
@emmajanehw
http://drupalize.me
Slides: http://lb.com/dcto13-git
How to git: http://lb.cm/howto-git-videos
Saturday, 13 July, 13

More Related Content

Viewers also liked

Presentation7
Presentation7Presentation7
Presentation7ealeno
 
Communications 2 0
Communications 2 0Communications 2 0
Communications 2 0
e-Strategy
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Emma Jane Hogbin Westby
 
Flatstanleyprjct
FlatstanleyprjctFlatstanleyprjct
Flatstanleyprjctcarlynn
 
Drupal Version Control & File System Basics
Drupal Version Control & File System BasicsDrupal Version Control & File System Basics
Drupal Version Control & File System Basics
Julia Kulla-Mader
 

Viewers also liked (6)

Monitoring Processes
Monitoring ProcessesMonitoring Processes
Monitoring Processes
 
Presentation7
Presentation7Presentation7
Presentation7
 
Communications 2 0
Communications 2 0Communications 2 0
Communications 2 0
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010
 
Flatstanleyprjct
FlatstanleyprjctFlatstanleyprjct
Flatstanleyprjct
 
Drupal Version Control & File System Basics
Drupal Version Control & File System BasicsDrupal Version Control & File System Basics
Drupal Version Control & File System Basics
 

Similar to Git Makes Me Angry Inside

Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experiments
lacyrhoades
 
How, When, and Why to Patch a Module
How, When, and Why to Patch a Module How, When, and Why to Patch a Module
How, When, and Why to Patch a Module
Phase2
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Acquia
 
Team Development on Force.com with Github and Ant
Team Development on Force.com with Github and AntTeam Development on Force.com with Github and Ant
Team Development on Force.com with Github and AntSalesforce Developers
 
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
XebiaLabs
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon Prague
Emma Jane Hogbin Westby
 
Professional web development with libraries
Professional web development with librariesProfessional web development with libraries
Professional web development with libraries
Christian Heilmann
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
Techhub Riga - tm 27.07
Techhub Riga - tm  27.07Techhub Riga - tm  27.07
Techhub Riga - tm 27.07
Toms Bauģis
 
AtlasCamp 2013: ADG / Lean UX
AtlasCamp 2013: ADG / Lean UXAtlasCamp 2013: ADG / Lean UX
AtlasCamp 2013: ADG / Lean UXcolleenfry
 
9 ways to get started with Agile in public services
9 ways to get started with Agile in public services9 ways to get started with Agile in public services
9 ways to get started with Agile in public services
JosephBadman1
 
Reactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsReactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsSteve Pember
 
Performance testing locust
Performance testing   locustPerformance testing   locust
Performance testing locust
Angga Faizul Ikrom
 
Resisting The Feature Creature
Resisting The Feature CreatureResisting The Feature Creature
Resisting The Feature Creature
Christian Heilmann
 
Tools/Processes for serious android app development
Tools/Processes for serious android app developmentTools/Processes for serious android app development
Tools/Processes for serious android app development
Gaurav Lochan
 
How to Create a Workflow: 5 Tips to Get Started Quickly
How to Create a Workflow: 5 Tips to Get Started Quickly How to Create a Workflow: 5 Tips to Get Started Quickly
How to Create a Workflow: 5 Tips to Get Started Quickly
QuekelsBaro
 
Gutmacher javascript-bookmarklets-sosuv-july2020
Gutmacher javascript-bookmarklets-sosuv-july2020Gutmacher javascript-bookmarklets-sosuv-july2020
Gutmacher javascript-bookmarklets-sosuv-july2020
Glenn Gutmacher
 
Inventing The Next Business Programming Language
Inventing The Next Business Programming LanguageInventing The Next Business Programming Language
Inventing The Next Business Programming Language
Richard Green
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
alloy020
 
XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013
Tim Clark
 

Similar to Git Makes Me Angry Inside (20)

Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experiments
 
How, When, and Why to Patch a Module
How, When, and Why to Patch a Module How, When, and Why to Patch a Module
How, When, and Why to Patch a Module
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
 
Team Development on Force.com with Github and Ant
Team Development on Force.com with Github and AntTeam Development on Force.com with Github and Ant
Team Development on Force.com with Github and Ant
 
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon Prague
 
Professional web development with libraries
Professional web development with librariesProfessional web development with libraries
Professional web development with libraries
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
 
Techhub Riga - tm 27.07
Techhub Riga - tm  27.07Techhub Riga - tm  27.07
Techhub Riga - tm 27.07
 
AtlasCamp 2013: ADG / Lean UX
AtlasCamp 2013: ADG / Lean UXAtlasCamp 2013: ADG / Lean UX
AtlasCamp 2013: ADG / Lean UX
 
9 ways to get started with Agile in public services
9 ways to get started with Agile in public services9 ways to get started with Agile in public services
9 ways to get started with Agile in public services
 
Reactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsReactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and Grails
 
Performance testing locust
Performance testing   locustPerformance testing   locust
Performance testing locust
 
Resisting The Feature Creature
Resisting The Feature CreatureResisting The Feature Creature
Resisting The Feature Creature
 
Tools/Processes for serious android app development
Tools/Processes for serious android app developmentTools/Processes for serious android app development
Tools/Processes for serious android app development
 
How to Create a Workflow: 5 Tips to Get Started Quickly
How to Create a Workflow: 5 Tips to Get Started Quickly How to Create a Workflow: 5 Tips to Get Started Quickly
How to Create a Workflow: 5 Tips to Get Started Quickly
 
Gutmacher javascript-bookmarklets-sosuv-july2020
Gutmacher javascript-bookmarklets-sosuv-july2020Gutmacher javascript-bookmarklets-sosuv-july2020
Gutmacher javascript-bookmarklets-sosuv-july2020
 
Inventing The Next Business Programming Language
Inventing The Next Business Programming LanguageInventing The Next Business Programming Language
Inventing The Next Business Programming Language
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
 
XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013
 

More from Emma Jane Hogbin Westby

Was it something I said?
Was it something I said?Was it something I said?
Was it something I said?
Emma Jane Hogbin Westby
 
HOWTO Empathy
HOWTO EmpathyHOWTO Empathy
Lessons From an Unlikely Superhero
Lessons From an Unlikely SuperheroLessons From an Unlikely Superhero
Lessons From an Unlikely Superhero
Emma Jane Hogbin Westby
 
PSD to Theme: The SMACSS Way
PSD to Theme: The SMACSS WayPSD to Theme: The SMACSS Way
PSD to Theme: The SMACSS Way
Emma Jane Hogbin Westby
 
Was It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A CritiqueWas It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A CritiqueEmma Jane Hogbin Westby
 
Beyond the Bikeshed
Beyond the BikeshedBeyond the Bikeshed
Beyond the Bikeshed
Emma Jane Hogbin Westby
 
Gamestorming Meets Quiet
Gamestorming Meets QuietGamestorming Meets Quiet
Gamestorming Meets Quiet
Emma Jane Hogbin Westby
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
Emma Jane Hogbin Westby
 
Work Flow for Solo Developers and Small Teams
Work Flow for Solo Developers and Small TeamsWork Flow for Solo Developers and Small Teams
Work Flow for Solo Developers and Small Teams
Emma Jane Hogbin Westby
 
Evaluating Base Themes
Evaluating Base ThemesEvaluating Base Themes
Evaluating Base Themes
Emma Jane Hogbin Westby
 
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoEmma Jane Hogbin Westby
 
Selling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp TorontoSelling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp TorontoEmma Jane Hogbin Westby
 
Forensic Theming - DrupalCon London
Forensic Theming - DrupalCon LondonForensic Theming - DrupalCon London
Forensic Theming - DrupalCon London
Emma Jane Hogbin Westby
 
There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010Emma Jane Hogbin Westby
 
Drupal Help System
Drupal Help SystemDrupal Help System
Drupal Help System
Emma Jane Hogbin Westby
 

More from Emma Jane Hogbin Westby (20)

Was it something I said?
Was it something I said?Was it something I said?
Was it something I said?
 
HOWTO Empathy
HOWTO EmpathyHOWTO Empathy
HOWTO Empathy
 
Lessons From an Unlikely Superhero
Lessons From an Unlikely SuperheroLessons From an Unlikely Superhero
Lessons From an Unlikely Superhero
 
PSD to Theme: The SMACSS Way
PSD to Theme: The SMACSS WayPSD to Theme: The SMACSS Way
PSD to Theme: The SMACSS Way
 
Was It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A CritiqueWas It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A Critique
 
Beyond the Bikeshed
Beyond the BikeshedBeyond the Bikeshed
Beyond the Bikeshed
 
Gamestorming Meets Quiet
Gamestorming Meets QuietGamestorming Meets Quiet
Gamestorming Meets Quiet
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
 
Work Flow for Solo Developers and Small Teams
Work Flow for Solo Developers and Small TeamsWork Flow for Solo Developers and Small Teams
Work Flow for Solo Developers and Small Teams
 
Evaluating Base Themes
Evaluating Base ThemesEvaluating Base Themes
Evaluating Base Themes
 
Speaker Check-in - 3 - Munich
Speaker Check-in - 3 - MunichSpeaker Check-in - 3 - Munich
Speaker Check-in - 3 - Munich
 
Drupal Flyover, CMS Expo
Drupal Flyover, CMS ExpoDrupal Flyover, CMS Expo
Drupal Flyover, CMS Expo
 
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
 
Selling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp TorontoSelling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp Toronto
 
Forensic Theming - DrupalCon London
Forensic Theming - DrupalCon LondonForensic Theming - DrupalCon London
Forensic Theming - DrupalCon London
 
Forensic Theming for Drupal
Forensic Theming for DrupalForensic Theming for Drupal
Forensic Theming for Drupal
 
There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010
 
Advanced Layout Techniques @ CMSExpo
Advanced Layout Techniques @ CMSExpoAdvanced Layout Techniques @ CMSExpo
Advanced Layout Techniques @ CMSExpo
 
Design to Theme @ CMSExpo
Design to Theme @ CMSExpoDesign to Theme @ CMSExpo
Design to Theme @ CMSExpo
 
Drupal Help System
Drupal Help SystemDrupal Help System
Drupal Help System
 

Recently uploaded

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 

Recently uploaded (20)

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 

Git Makes Me Angry Inside

  • 1. Git Makes Me Angry Inside Emma Jane Westby Education Development Coordinator Drupalize.Me @emmajanehw http://drupalize.me Slides at: http://tinyurl.com/dcto13-git Saturday, 13 July, 13 Problem: Developers face a steep learning curve when they choose to adopt version control. Solution: There is a version control strategy to suit your workflow, even if you've always thought it was too hard to bother. Is your project folder filled with files like this: page.old.2.bak.php? Does Git make you angry inside? Do you resent that everyone except you regularly visits the magical place referred to as "The Command Line"? Are you afraid of the vagrant who stole your puppet? In this session you will get a gentle introduction to working efficiently as a developer in small teams, or as a solo developer. We'll focus on real world examples you can actually use to make your work faster and more efficient. Yes, this is an introductory session. This is for people who feel shame that they don't know how to "just cd into yer root durrr" and get mad when people say "just diff me a patch" as if it's something as easy as making a mai thai even though you have no rum. No, you don't have to have git installed to attend. You don't even need to know where the command line is on your computer.
  • 2. Why Stick Around • Learn how Git thinks, without being exposed to the command line. • Learn how to structure your work flow to take advantage of Git. • Learn how basic commands are applied to common work flow scenarios. • Q&A / therapy session Saturday, 13 July, 13
  • 3. What’s your role? Saturday, 13 July, 13 You need to start with the people....
  • 4. What are your tasks? download work create snapshot share work Saturday, 13 July, 13 What are the tasks that your team work on? For example: download work, make changes, upload work to a shared space.
  • 5. What’s your workflow? Saturday, 13 July, 13 There are a lot of valid workflows.
  • 6. What’s your branch management strategy? Saturday, 13 July, 13 As your people are working together, they need to have private, and shared spaces to do their work. This is where a branch management strategy gets layered in.
  • 7. How do we make Git do that? Git Shell, cross-platform Saturday, 13 July, 13 We’re not going to talk about the specifics of how to run commands today. But these are a few examples of the GUIs that are available for different platforms. (You don’t *have to be* stuck on the command line if you don’t want to be.) Before we get started: let’s take a second to find out who you are. Why are you here, and how are you currently struggling with version control?
  • 8. Git is 90% process and 10% technology. • Git was written by kernel developers, for kernel developers. Chances are high you’re not a kernel developer. Stop blaming yourself, and start blaming Git for your struggles. • Not all is lost! If you can diagram the problem you are trying to solve; you will be able to find the right Git commands. • Before we start drawing pictures, let’s take a look at some of the concepts version control helps us with. Saturday, 13 July, 13 Out of the box, Git does basically nothing for you. It’s your processes that will allow you to apply the tools you need to make version control work for you. Then go through each of the points listed. Transition: let’s take a look at some of the terms you’ll run into when working with Git to give us a shared language.
  • 9. Version control (sort of) makes automation easier • Backup and restore • Synchronize across multiple platforms • Short-term “undo” to test implications of changes • Long-term “undo” to reverse bugs or regressions • Track changes to see why/how software evolved • Track ownership to give “credit” to change makers • Sandbox code to test changes without affecting other people and systems Saturday, 13 July, 13 There are a lot of valid reasons to use version control. The biggest gain bigger teams will see is in automation of process. But you don’t need to automate things to take advantage of version control. Read through the list of things version control helps with.
  • 10. Terminology: locations • remote repository • trunk or main • head or tip • local repository • client • working copy Saturday, 13 July, 13 There are a lot of terms in version control. Creating a map of where things live can make the documentation a lot easier to deal with. Repo: database of changes to your files. Server: computer storing the repo Client: computer connecting to the repo Working copy: local copy where changes are made Trunk/main: The current, primary source for unchanged code Head: the latest revision in a repository (tip: latest in a branch...HEAD moves, tip doesn’t).
  • 11. Terminology: actions and tasks Saturday, 13 July, 13 With our locations mapped out, let’s take a look at the common tasks or “actions” you can take. Basic actions: adopt / download: clone, merge, fetch, checkout, pull/rebase review: log, status compare: diff HEAD, diff, diff --cached reset: checkout, checkout HEAD, reset --hard (throw away in-between commits), revert (save in-between commits) save: add -u, commit, commit -a distribute: push
  • 12. Set the stage! Before we can set our workflow we need to know who we’re dealing with and what they’re supposed to be doing. Saturday, 13 July, 13 People first. In this next section, we’ll start with the folks on your team (not the software).
  • 13. Who’s on your code team? Write down a list of all of the people on your code team. This list may include: • developers • designers • project managers • clients Saturday, 13 July, 13 Who are the folks on your team? Designer? Developer? Site builder?
  • 14. Where do you fit in? Maybe you do everything. Maybe you only do some things. Write a list of all the tasks you are actually responsible for. This might include: • Writing code. • Reviewing code. • Pushing tested code to the server. • Fixing broken code. Saturday, 13 July, 13 Slide is “as advertised”.
  • 15. What are your tools and restraints? Often there are other things we need to fit into our workflow. Create a third list of any tools and restraints you are aware of. This list might include: • Version control software (we’ll always assume Git) • Code hosting system (Bitbucket, GitHub, self-hosted) • Server ecosystem (dev / staging / live) • Code editors & integrated developer environments (vim, Dreamweaver, Sublime, PHPstorm) • Automated testing systems or review “gates” Saturday, 13 July, 13 Slide is “as advertised”.
  • 16. What’s your workflow? With the team members identified, it’s time to sketch out how these people (ideally) work together. Saturday, 13 July, 13 Now that we know the people, let’s talk about how they work together. There are lots of valid ways of working together, let’s take a look at a few of them.
  • 17. Solo developer workflow Saturday, 13 July, 13 Solo dev workflow: create project, add files, do work, upload files
  • 18. Partner workflow with no central server Saturday, 13 July, 13 James starts a grocery list; Emma already had a grocery list started so she asks to see James’s list. She adds her items to James’s list and hands it back.
  • 19. Centralized workflow with no local commits Saturday, 13 July, 13 the “old” style of version control has a single place where all work is checked into. Every time work is saved, it’s uploaded to the shared space. You can implement this workflow with distributed version control too, but you wouldn’t want to.
  • 20. Decentralized with human gatekeeper Saturday, 13 July, 13 This is pretty typical: it’s a decentralized workflow. The developers pull/clone. Do their work locally and then ask their “gatekeeper” to check their work and merge it into the central repo. Once the central repo has the changes, the devs grab a fresh copy and continue their work.
  • 21. Decentralized with automated gatekeeper Saturday, 13 July, 13 The decentralized with automated gatekeeper is almost the same, except it’s a computer making the decision on whether or not code should be accepted. This is fine for quantitative reviews, but shouldn’t be used for qualitative reviews...unless there are pre-merge peer reviews also happening.
  • 22. Sketch out your workflow • Identify the roles on your team. • Identify the relationships between the team members. • Draw arrows to show how code flows between team members. Saturday, 13 July, 13 Slide is “as advertised”.
  • 23. How will you manage your branches? With the workflow described, it’s time to look at how the code will be segregated into different branches. Saturday, 13 July, 13 This is where the fun starts! Managing branches in a distributed workflow.
  • 24. Popular strategies • http://nvie.com/posts/a- successful-git-branching-model • http://scottchacon.com/ 2011/08/31/github-flow.html Saturday, 13 July, 13
  • 25. Work flow and branch management Saturday, 13 July, 13
  • 26. Work flow and branch management Saturday, 13 July, 13
  • 27. Work flow and branch management peer review Saturday, 13 July, 13
  • 28. Work flow and branch management peer review public / live server Saturday, 13 July, 13
  • 29. Work flow and branch management peer review public / live server Saturday, 13 July, 13
  • 30. Work flow and branch management peer review public / live server dev / testing server Saturday, 13 July, 13
  • 31. Work flow and branch management peer review public / live server dev / testing server master master master Saturday, 13 July, 13
  • 32. Work flow and branch management peer review public / live server dev / testing server master master master dev dev dev Saturday, 13 July, 13
  • 33. Work flow and branch management feature feature hotfix featur peer review public / live server dev / testing server master master master dev dev dev Saturday, 13 July, 13
  • 34. Work flow and branch management feature feature hotfix featur peer review public / live server dev / testing server master master master dev dev dev Saturday, 13 July, 13
  • 35. Sketch out your branch management strategy • Identify the roles on your team. • Identify the relationships between the team members. • Draw arrows to show how code flows between team members. • Time: 10 minutes Saturday, 13 July, 13
  • 36. Q&A + Git Therapy Session Saturday, 13 July, 13
  • 37. You can make Git do what you want... now that you know what you want. @emmajanehw http://drupalize.me Slides: http://lb.com/dcto13-git How to git: http://lb.cm/howto-git-videos Saturday, 13 July, 13