AVOIDING THE GIT OF DESPAIR

Similar documents
DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

Putting It All Together. Vagrant Drush Version Control

Git - Working with Remote Repositories

Automate Your Deployment with Bamboo, Drush and Features DrupalCamp Scotland, 9 th 10 th May 2014

Introduction to the Git Version Control System

Git Basics. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 22

Version control with GIT

Streamline your drupal development workflow in a 3-tier-environment - A story about drush make and drush aliases

Zero-Touch Drupal Deployment

MOOSE-Based Application Development on GitLab

Version Control. Version Control

FEEG Applied Programming 3 - Version Control and Git II

DRUPAL CONTINUOUS INTEGRATION. Part I - Introduction

Git Basics. Christian Hanser. Institute for Applied Information Processing and Communications Graz University of Technology. 6.

Version Control with Svn, Git and git-svn. Kate Hedstrom ARSC, UAF

Module developer s tutorial

Subversion. Nadir SOUALEM. Linux Users subversion client svn or higher. Windows users subversion client Tortoise 1.6.

Git. A Distributed Version Control System. Carlos García Campos carlosgc@gsyc.es

Introduction to Git. Markus Kötter Notes. Leinelab Workshop July 28, 2015

Using SVN to Manage Source RTL

PKI, Git and SVN. Adam Young. Presented by. Senior Software Engineer, Red Hat. License Licensed under

Achieving Continuous Integration with Drupal

DEPLOYING DRUPAL USING CAPISTRANO

Git Branching for Continuous Delivery

MATLAB & Git Versioning: The Very Basics

Version Control with Git. Dylan Nugent

Drupal Drush Guide. Drupal.org

Version Control with Git. Kate Hedstrom ARSC, UAF

Unity Version Control

Simple and powerful site deployment with capistrano

How to set up SQL Source Control. The short guide for evaluators

Introduction to Source Control ---

Content. Development Tools 2(63)

Version Control with. Ben Morgan

Drupal for Designers

Introduction to Subversion

Version Control with Git. Linux Users Group UT Arlington. Rohit Rawat

Using SVN to Manage Source RTL

Annoyances with our current source control Can it get more comfortable? Git Appendix. Git vs Subversion. Andrey Kotlarski 13.XII.

JOINUS AG. PowerPay Checkout. Magento Module User Manual. Support:

Drupal CMS for marketing sites

SHIPSTATION / MIVA MERCHANT SETUP GUIDE

Software configuration management

CISC 275: Introduction to Software Engineering. Lab 5: Introduction to Revision Control with. Charlie Greenbacker University of Delaware Fall 2011

Version Control with Git

Setting up a local working copy with SVN, MAMP and rsync. Agentic

CPSC 491. Today: Source code control. Source Code (Version) Control. Exercise: g., no git, subversion, cvs, etc.)

Dry Dock Documentation

How To Fix A Bug In Drupal 8.Dev

Entites in Drupal 8. Sascha Grossenbacher Christophe Galli

MANAGE AND DEPLOY YOUR SITES WITH DRUSH

Continuous Integration and Delivery at NSIDC

Managing Projects Using Drupal 8 s Configuration Management System

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

Auditing Drupal sites for performance, content and optimal configuration

Palantir.net presents Git

Version Control using Git and Github. Joseph Rivera

How To Manage A Multi Site In Drupal

Revision control systems (RCS) and

Work. MATLAB Source Control Using Git

Using Microsoft Azure for Students

Understanding offline files

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

A Git Development Environment

Software Delivery Integration and Source Code Management. for Suppliers

Version Control for Computational Economists: An Introduction

SourceAnywhere Service Configurator can be launched from Start -> All Programs -> Dynamsoft SourceAnywhere Server.

CS 2112 Lab: Version Control

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

In depth study - Dev teams tooling

Document version: 1.1. Installation Guide Übercart (Klarna Payment Module 1.1)

Continuous Integration (CI)

Version Control! Scenarios, Working with Git!

Working Copy 1.4 users manual

Version Control Using Subversion. Version Control Using Subversion 1 / 27

Source Control Systems

The Social Accelerator Setup Guide

Module 11 Setting up Customization Environment

ProxiBlue Dynamic Category Products

Things you should be doing with Salesforce

Using your Drupal Website Book 1 - Drupal Basics

RecoveryVault Express Client User Manual

Automatic promotion and versioning with Oracle Data Integrator 12c

Gitflow process. Adapt Learning: Gitflow process. Document control

Online Backup Linux Client User Manual

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Jazz Source Control Best Practices

Transcription:

AVOIDING THE GIT OF DESPAIR EMMA JANE HOGBIN WESTBY SITE BUILDING TRACK @EMMAJANEHW http://drupal.org/user/1773

Avoiding The Git of Despair @emmajanehw http://drupal.org/user/1773 www.gitforteams.com

Local Dev Staging Prod

With Apologies To Those Who ve Not Seen The Princess Bride.

Happening How Git works in a deployment landscape. How to use branches for different environments. Commands you need to run. Why it s hard to collaborate on Features. Commands to deal with with merge conflicts

Not Happening First-timer s guide to: Drupal Module: Features Git (at the Command line)

20,000ft View Drupal Module: Features

Features A feature is a collection of Drupal entities which taken together satisfy a certain use-case. Features allow us to export point-and-clicked configuration from one environment to another. https://drupal.org/project/features

/* Sort criterion: Content: Post date */ $handler->display->display_options['sorts'] ['created']['id'] = 'created'; $handler->display->display_options['sorts'] ['created']['table'] = 'node'; $handler->display->display_options['sorts'] ['created']['field'] = 'created'; $handler->display->display_options['sorts'] ['created']['order'] = 'DESC';

Sharing Features

Sharing Features

10,000ft View Deploying Code with Git

Deploying Code

(Actually) Deploying Code

Remember This Branches allow you to store separate instances of ongoing work.

Remember This Git branching strategies are conventions we use based on common deployment setups.

Per-Environment Branches

Per-Environment Branches

5,000ft View Sharing Features with Git

Sharing Features with Git

Remember This Features (and its related export functions) is not always perfect but it is always better than using nothing.

5,000ft View Improving Consistency with Drush

Remember This The command line can provide a faster route to a more consistent experience.

Drush Drush is a command-line shell and scripting interface for Drupal. Execute cron, run update.php, work with Features, clear cache, and more. https://github.com/drush-ops/drush

Remember This Features focuses on code where Drupal would have normally focused on the database.

https://www.drupal.org/node/582680

Features + Drush Command Line Survival Guide export a feature drush fu revert a feature really revert your features clear all caches drush fr drush fra --force --yes drush cc all

5,000ft View Avoiding Conflict

Remember This Be Unique; Avoid Overlap

Branch Reminder

Getting Ready (in Git) Start in the right "environment" $ git checkout [dev] Create a new feature branch $ git checkout -b [1234-new_feature]

Creating a Feature (Site Builder-friendly) Set all Features back to their factory defaults. $ drush fra --force --yes Build your new feature with the pointy-clicky. Export your feature s settings with the pointy-clicky. Put the downloaded file into: /sites/all/modules/features Unpack your new feature $ tar xvf feature_name.tar.gz

Updating a Feature (Site Builder-friendly) Set all Features back to their factory defaults. $ drush fra --force --yes Build your new feature with the pointy-clicky. Update all features to use settings from the database $ drush features-update-all or $ drush fu-all

Verify Your Feature is Right Your code is now changed to match the database. Using Git, see what s changed. $ git diff Checklist: Within an array, are the values in the same order? Are strings (not) quoted? Are there extra pieces? Are there missing pieces?

Git It Up Check what is currently not in your repository $ git status Add the new Feature to Git $ git add [feature_directory] Save the new Feature to your repository $ git commit Add a really good commit message which describes what your Feature is, and all of its compoents.

Share Your Feature Upload the Feature to your shared code hosting repository $ git push origin [1234-new-feature]

Testing Someone Else s Feature Update your local list of branches $ git fetch Clean up your database by reverting all Features $ drush fra --force --yes Switch to the branch where the new Feature is $ git checkout --track origin/[1235-new-feature] Import the new Feature $ drush fr

Adding a Feature to a Shared Branch Checkout the branch you want to add the new Feature to. $ git checkout [dev] Ensure your copy of the branch is up-to-date. $ git pull --rebase=preserve Include the new Feature into the current branch $ git merge --no-ff [1234-new-feature]

10,000ft View Dealing with Conflicts

Conflict is when there is overlap at the same line. ours theirs

Investigating Conflict Determine the point of conflict: $ git mergetool Want to undo that merge? Back the truck up. $ git reset --merge ORIG_HEAD Take another look at the differences $ git diff [1234-new-feature]...[master]

Choose ours ours theirs $ git merge -s ours [branch]

Resources Building a Drupal site with Git https://www.drupal.org/node/803746 Git for Teams http://gitforteams.com

More Resources Features - https://drupal.org/node/580026 Drush - http://drush.ws/ Introduction to Drush Series Features & Drush Series http://drupalize.me/series/introduction-drushseries http://drupalize.me/series/drupal-deploymentfeatures-drush-series

WHAT DID YOU THINK? EVAULATE THIS SESSION - LOSANGELES2015.DRUPAL.ORG/SCHEDULE WWW.GITFORTEAMS.COM