32
Source Control What technical communicators need to know

Source Control What technical communicators need to know

Embed Size (px)

DESCRIPTION

What I’ll cover NeedConceptsBest practicesSome tools

Citation preview

Page 1: Source Control What technical communicators need to know

Source Control

What technical communicators need to know

Page 2: Source Control What technical communicators need to know

About me

Page 3: Source Control What technical communicators need to know

What I’ll cover

NeedConceptsBest practices

Some tools

Page 4: Source Control What technical communicators need to know

What is source control?

A system for managing changes to source code

Page 5: Source Control What technical communicators need to know

I’ve deleted a file by mistake.

Someone has overwritten my

changes!

Before you can go on holiday, can you

leave us all your files?

Who changed this file? Why?

Who’s got the latest version of this file?

Where are the graphics files we used

for this topic?

I need to find the files we sent to the translators.

The developers have pulled this feature. Can we undo the documentation

changes?

Page 6: Source Control What technical communicators need to know

Why don’t we use it?

“I’ve made it a policy never to touch source control as I still don’t really understand how it works!”

Page 7: Source Control What technical communicators need to know

Do you need it?Multiple authors

Many small components

Multiple concurrent

versions

Documenting software Unless . . .

Page 8: Source Control What technical communicators need to know

Can you manage without it? Sole

authorFew

componentsClear

process

Reliable backups

Instead of SC, you could . . .

Page 9: Source Control What technical communicators need to know

The basics

• CommonRepository

• PersonalWorkspace

Page 10: Source Control What technical communicators need to know

Adding files

A1

B1

C1

Alice

Change list

Comment

A1B1

C1

Page 11: Source Control What technical communicators need to know

Bruno

Changing existing files

A1

B1

C1

Alice

A1B1

C1

A1B1

C1A2

C2

CommentComment C2D1

D1

A2

Change list

Page 12: Source Control What technical communicators need to know

Alice

C1

A1A2

D1

Bruno

Synchronising changes

A1

B1

C1

B1

A2

C2

D1

A2

C2B1

D1

C2

Page 13: Source Control What technical communicators need to know

Best practices

Use comments

Keep unrelated changes separate

Synchronise frequently

Page 14: Source Control What technical communicators need to know

C2

A3B4

Deleting files

A3A1 A2

B2B1 B3 B4

C2C1

D2D1 D3

Alice

D3

Page 15: Source Control What technical communicators need to know

A3A4(A2)

Reverting changes in the repository

B4

A3A1 A2

B2B1 B3 B4

C2C1

D2D1 D3

Alice

D3D4

A4(A2)

B5(B1)

C4(C2)

D5(D1)

B5(B1) C4

(C2) D5(D1)

Page 16: Source Control What technical communicators need to know

Concurrent changes and merges

Page 17: Source Control What technical communicators need to know

A3

D4

Concurrent changes - example

Bruno

A1 A2

B2B1 B3 B4

C2C1

D2D1 D3

D4

B4

A3

D4

B4

A3 A4

A4

!

Alice

Page 18: Source Control What technical communicators need to know

Merge example

Page 19: Source Control What technical communicators need to know

A3

D4

Merging concurrent changes

Bruno

Alice

A1 A2

B2B1 B3 B4

C2C1

D2D1 D3

D4

B4

D4

B4

A3 A4

3A4

!A3

A5

A4

A5

Page 20: Source Control What technical communicators need to know

Merge with caution

Not foolproof

Some files don’t

Different from software But . . .

Page 21: Source Control What technical communicators need to know

Best practices - merging

Avoid merges for some files!

Minimize concurrent

changes

Merge little and often

Consult others if necessary

Check the results

Page 22: Source Control What technical communicators need to know

Baselines

Page 23: Source Control What technical communicators need to know

A3

Baseline example

A3A1 A2

B2B1 B3 B4

C2C1

D2D1 D3

D4

B4

Alice

D3

A2

D1

C2B1

Beta

BetaBeta

Page 24: Source Control What technical communicators need to know

Branching

Concurrent released versions

• Permanent

New features • Temporary

Page 25: Source Control What technical communicators need to know

Branching in action

D1C1B1

D1C1B1

D1C1B1

Trunk

Feature/Development Branch

Release Branch

Page 26: Source Control What technical communicators need to know

Best practices - branching

Propagate from release branches promptly

Merge to feature branches regularly

Page 27: Source Control What technical communicators need to know

What belongs in source control?

Sources

Not auto-generated outputs

Page 28: Source Control What technical communicators need to know

Choosing a tool

Page 29: Source Control What technical communicators need to know

The choices

Free or paid for

Hosted or self-hosted

Front end

Centralised or Distributed

HAT integration

Page 30: Source Control What technical communicators need to know

Some source control tools• Free, CLI + limited GUI• Several GUIs, SourceTree is freeGit

• Free, CLI only• Several GUIs, TortoiseSVN is freeSubversion (SVN)

• Free for small teams, CLI only• Several GUIs, SourceTree, Tortoise Hg are freeMercurial

• Microsoft• Free for small teams, includes GUI

Team Foundation Server (TFS)

• Free for small teams, includes GUIPerforce

• IBM• Enterprise, not free!

RationalClearCase

Page 31: Source Control What technical communicators need to know

© Marjorie Jones 2015Artwork © Martin Jones 2015

E: [email protected]: @titch990W: https://nfasa.wordpress.com/