WordCamp Europe 2013 Git & WordPress-Themes

32
Welcome everybody! Session „Git & WordPress Themes“
  • date post

    19-Oct-2014
  • Category

    Technology

  • view

    1.796
  • download

    0

description

Session on WordCamp Leiden

Transcript of WordCamp Europe 2013 Git & WordPress-Themes

Page 1: WordCamp Europe 2013 Git & WordPress-Themes

Welcome everybody!Session „Git & WordPress Themes“

Page 2: WordCamp Europe 2013 Git & WordPress-Themes

@kirstenschelper @taxifisch | #wceu

Git & WordPress

Who is this talk for?

• Level: Git Beginners

• Designers developing WordPress themes with no programming background

• People who tried again and again but didn‘t get a grip on how Git works

Page 3: WordCamp Europe 2013 Git & WordPress-Themes

@kirstenschelper @taxifisch | #wceu

Git & WordPress

What‘s not in this talk

• The answer to all questions

• Step by step tutorial how to use Git

• Advanced secrets and Git-Voodoo

Page 4: WordCamp Europe 2013 Git & WordPress-Themes

@kirstenschelper @taxifisch | #wceu

Git & WordPress

Who we are

Page 5: WordCamp Europe 2013 Git & WordPress-Themes

@kirstenschelper @taxifisch | #wceu

Git & WordPress

Kirsten Schelper{designer}

Elisabeth Hölzl{developer}

Page 6: WordCamp Europe 2013 Git & WordPress-Themes

@kirstenschelper @taxifisch | #wceu

Git & WordPress

What we do• We build custom WordPress themes for clients

• We live in Munich, Germany

• We dont‘t drink much beer

Page 7: WordCamp Europe 2013 Git & WordPress-Themes

http://www.flickr.com/photos/14646075@N03/5055254756/sizes/l/in/photostream/

Yes, we survived the Oktoberfest!

Page 8: WordCamp Europe 2013 Git & WordPress-Themes

@kirstenschelper @taxifisch | #wceu

Git & WordPress

How we got in touch with Git

Page 9: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

The s_theme (by Automattic)

… lives on GitHub*

… used by Kirsten as a boilerplate

* built by different people working together * gets fixes and changes frequently

Page 10: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Kirsten‘s workflow so far

… download s_theme from Github

… working on my local copy

… missing all fixes and changes by Automattic because my local copy had no connection to the original s_theme on github

Page 11: WordCamp Europe 2013 Git & WordPress-Themes

http://www.flickr.com/photos/jondissed/1387181891

This didn‘t feel right

Page 12: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

So, let‘s get started with Git!

Page 13: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Just copy and paste these commands to the terminal

Page 14: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Kirsten‘s story

• I installed Git on my local machine

• I tried some stuff, changed files etc.

• But I didn‘t SEE anything

• This whole Git thing – was totally invisible!

Page 15: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Interim result

• As a designer with no programming background, you are completely lost

• You need some help from a friendly developer

Page 16: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

What makes Git tick?

Page 17: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

The problem challenge1. Abstraction. Hard for visual people.

2. Working with the command line means: There is no visual feedback You literally don‘t see what you are doing.

3. It‘s all in the command line

Page 18: WordCamp Europe 2013 Git & WordPress-Themes

http://www.flickr.com/photos/zigazou76/3622235298/sizes/l/

Git is simple. Well, not quite.

Page 19: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Some Git greek• init

• repository

• commit

• branch

• merge

Page 20: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceuSCHELPERDESIGN.NET

initialize

Page 22: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Example Git Workflow

Page 23: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Goals workflow s_theme• We use the s_theme as a boilerplate

for our WordPress themes

• We don‘t want to miss updates any more

• We don‘t want to lose our custom code either

Page 24: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Page 25: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Roundup GitHub workflow

• Choose a project on GitHub and fork it

• Install Git on your local machine

• Clone the project to your local machine

• Do some work

• Connect your local project to the original project on GitHub (step 3)

• Fetch updates from the original project (step 4)

Page 26: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Kirsten‘s Git Workflow

Page 27: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Page 28: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Staging Area• Git wants you to add your changes to something called

„staging area“ before you commit them.

• The staging area is like a warehouse where you can pack sensible packages, e.g. menu goes with menu, slider goes with slider.

• The staging area allows you to configure your commits in a meaningful way.

Page 29: WordCamp Europe 2013 Git & WordPress-Themes

Feeling lost?

Darinburt/istockphoto.com http://www.istockphoto.com/stock-photo-2070269-lost.php

Page 30: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

It‘s not easy

• Git takes a lot of learning

• But it‘s worth it

Don‘t be scared – working with Git is pretty safe

It‘s actually rather hard to destroy something

Page 32: WordCamp Europe 2013 Git & WordPress-Themes

Git & WordPress

@kirstenschelper @taxifisch | #wceu

Thank you!Your Questions