SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette (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
 

Similaire à Git Makes Me Angry Inside

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
Salesforce Developers
 
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
 
AtlasCamp 2013: ADG / Lean UX
AtlasCamp 2013: ADG / Lean UXAtlasCamp 2013: ADG / Lean UX
AtlasCamp 2013: ADG / Lean UX
colleenfry
 
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
Steve Pember
 

Similaire à 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
 

Plus de 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 Critique
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 Expo
Emma 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 Toronto
Emma 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 2010
Emma Jane Hogbin Westby
 

Plus de 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
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

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