+ All Categories
Home > Software > Git and Features by SpartyDan as presented at DrupalCamp Michigan

Git and Features by SpartyDan as presented at DrupalCamp Michigan

Date post: 15-Jul-2015
Category:
Upload: commercial-progression
View: 485 times
Download: 0 times
Share this document with a friend
25
@comprodrupal git & features Building a Reliable Workflow Dan Reinders - Expert SpartyDan
Transcript

@comprodrupal

git & featuresBuilding a Reliable Workflow

Dan Reinders - ExpertSpartyDan

@comprodrupal

Reliable Project Workflow

Code DataProduction

Staging

Local Dev

@comprodrupal

Created using the UI

● Content Types● Views● Image Styles

Stored in database - doesn’t fit the workflow

View in Code

Changes Happen.

Feature Overridden

What Change Happened?

Recreate Feature.

Features. Yes.

Now, how do you deal with code changes?

That’s your intro to Features.

@comprodrupal

I’ve never done that.

Have you ever had files like this?index.html.old

index.html.oct31index.html

@comprodrupal

Why is this bad practice?

It relies on your memory...

What does index.html.old

do different than index.html?

@comprodrupal

What about our Features?

How do we keep track of whichexported feature we are using

on Prod, Stage, and Dev?

How do we move code from oneenvironment to the next?

@comprodrupal

Version ControlVersioning

Source ControlRevision Control

We need to wrangle the code.

@comprodrupal

What VCS should I use?

Because I said so.git

Why?

@comprodrupal

What is git?

Git is a distributed version control system.

Okay, why is git better than (insert other VCS)

Because I said so.

@comprodrupal

How do I get started?

git init

Initializes a repository in the current directory.

The new repository resides in the .git directory

@comprodrupal

Now what?

git status - shows the current status

@comprodrupal

Add (stage) index.html

git add index.html git add .git add -ugit add path

@comprodrupal

commit index.html

git commit -m “added index.html”git statusgit lg

*remind me to talk about git aliases

@comprodrupal

Everyday git commands

cloneinitaddrmcommit

checkoutbranchstatusdiffmerge

fetchpushpullrebase


Recommended