git hub for designers

49
GitHub for Designers Ash Furrow, Teehan+Lax @ashfurrow

Upload: fitc

Post on 07-May-2015

285 views

Category:

Technology


6 download

DESCRIPTION

In this talk, Teehan+Lax developer Ash Furrow will guide designers through the basics of GitHub. He’ll discuss why GitHub is important and teach you the high-level concepts that will get you started with GitHub today.

TRANSCRIPT

Page 1: Git hub for designers

GitHub for DesignersAsh Furrow, Teehan+Lax

@ashfurrow

Page 2: Git hub for designers
Page 3: Git hub for designers

Learn the fundamentals of git and GitHub in order to better collaborate with teams.

Page 4: Git hub for designers

Agenda

• Git & GitHub

• Git is a Tool for Managing Files

• The Fundamentals

• Using Git doesn’t Mean Using the Command Line

4

Page 5: Git hub for designers

Git & GitHub

Page 6: Git hub for designers

Git & GitHub

• Git is a tool for managing files (more on that later)

• GitHub is a website for using git

6

Page 7: Git hub for designers

Git & GitHub

• Git can be used independently of GitHub

• Even offline!

• This talk is about using Git & GitHub together

7

Page 8: Git hub for designers

Git is a Tool for Managing Files

Page 9: Git hub for designers

Git is a Tool for Managing Files

• Git manages simple files

• Text and flat graphics, not PSDs

• CSS, HTML, PNG

• PSDs are too complex for git to manage

• Use LayerVault, instead

9

Page 10: Git hub for designers

Git is a Tool for Managing Files

• What does “manage” mean?

• History (who did what, and when?)

• Conflicts (multiple people modifying the same file)

10

Page 11: Git hub for designers

The Fundamentals

(More like FUNdamentals, amirite?)

Page 12: Git hub for designers

Pulling Down from Remote

12

Your Branch

master

master

rem

ote

loca

l

Your Branch

Pull Request

PushPull Pull

Page 13: Git hub for designers

A Repose About Repos

• A repository – or “repo” – is a home for git to put all its files

• Repos can exist locally (on your computer) or remotely (on GitHub) – more on this later

13

Page 14: Git hub for designers

Branches

• Hard to define

• Branches are used to isolate changes to files

• Branches are cheap

• Create lots of ‘em

• Ideally one for each new feature/bug fix

14

Page 15: Git hub for designers

Branching

• Creating a new branch is called “branching”

• Branch to create new features

• Create new branches off of “master” branch

• Master is the canonical branch

• “Latest and Greatest”

15

Page 16: Git hub for designers

Branching

• File system metaphor

16

Page 17: Git hub for designers

Branching

17

Your Branch

master

Creating a new branch

Page 18: Git hub for designers

Commits

• When you’ve completed a feature or a fix, make a commit

• Commits are snapshots of the staged changes you made

• Not all changes need to be committed

18

Page 19: Git hub for designers

Committing

• Branches are just a series of commits

• Committing enters that commit into the git log

• You can see who changed what, and when

19

Page 20: Git hub for designers

Committing

• Commits include a “commit message” describing the changes

20

Page 21: Git hub for designers

Committing

1. Stage changes

2. Commit staged changes

21

Page 22: Git hub for designers

Committing

22

Your Branch

master

commit 1 commit 2

Page 23: Git hub for designers

Local vs. Remote

• The master branch exists locally (on your computer) and remotely (on GitHub)

• Your new branch exists only locally

23

Page 24: Git hub for designers

Local vs. Remote

• File server metaphor

24

Page 25: Git hub for designers

Local vs. Remote

• All work is done locally on local branches

• When ready, you “push” a branch to the remote

• More on pushing shortly

25

Page 26: Git hub for designers

Local vs. Remote

• Where did “master” come from?

• The remote

26

Page 27: Git hub for designers

Pulling & Pushing

27

Your Branch

master

masterre

mot

e

loca

l

Pull

Page 28: Git hub for designers

Pulling & Pushing

• Transitive verbs

• Pushing/pulling depends on context

28

Page 29: Git hub for designers

Pulling & Pushing

1. Pull master from GitHub

2. Branch

3. Make commits

4. Push branch to GitHub

29

Page 30: Git hub for designers

Pulling & Pushing

30

Your Branch

master

masterre

mot

e

loca

l

Your Branch

PushPull

Page 31: Git hub for designers

Pull Requests

• Pull requests are requests to have changes “pulled” into another branch, usually master

• Pull requests exist only on GitHub

• “Request” because someone else is looking it over for mistakes

• Not that you ever make those

31

Page 32: Git hub for designers

Pull Requests

• Designate someone on your team as a “Gatekeeper”

32

Page 33: Git hub for designers

Pull Requests

33

Your Branch

master

master

rem

ote

loca

l

Your Branch

Pull Request

PushPull

Page 34: Git hub for designers

Pull Requests

• Now all of your changes exist on master

• Only the remote master

• You need to “pull” master down again

34

Page 35: Git hub for designers

Pulling Down from Remote

35

Your Branch

master

master

rem

ote

loca

l

Your Branch

Pull Request

PushPull Pull

Page 36: Git hub for designers

Cloning

Page 37: Git hub for designers

Cloning

• Copies the remote repo to your local

• Only done once per repo

• “Initial Setup”

37

Page 38: Git hub for designers

Pulling & Pushing

1. Clone

2. Pull master from GitHub

3. Branch

4. Make commits

5. Push branch to GitHub

6. Pull Request

38

Page 39: Git hub for designers

Issues

• GitHub has “Issues”

• Issues are conversations about the code

• Bugs, features, improvements, etc...

• You can reference issues in commit messages

39

Page 40: Git hub for designers

Issues

40

Page 41: Git hub for designers

Conflicts

Page 42: Git hub for designers

Conflicts

• Sometimes files conflict

• Git will usually sort it out

• Sometimes it can’t

42

Page 43: Git hub for designers

Conflicts

<<<<<<< HEAD

Hello world

=======

Goodbye

>>>>>>> some_other_branch_name

43

Page 44: Git hub for designers

Using Git doesn’t Mean Using the Command Line

Page 45: Git hub for designers

Using Git doesn’t Mean Using the Command Line

• There are powerful, GUI tools for using git

• Git Tower

• GitHub for Mac

• SourceTree

45

Page 46: Git hub for designers

Using Git doesn’t Mean Using the Command Line

• Important: all these tools rely on the fundamentals we learnt earlier

46

Page 47: Git hub for designers

Demo

Page 48: Git hub for designers

Recap

• Git & GitHub

• Git is a Tool for Managing Files

• The Fundamentals

• Using Git doesn’t Mean Using the Command Line

48

Page 49: Git hub for designers

Ash FurrowOctober 3, 2013

Thanks!