Git and GitHub for Documentation

39
COLLABORATING ON GIT AND GITHUB Anne Gentle FOR DOCUMENTATION

Transcript of Git and GitHub for Documentation

Page 1: Git and GitHub for Documentation

COLLABORATING ON GIT AND GITHUB

Anne Gentle

FOR DOCUMENTATION

Page 2: Git and GitHub for Documentation

Questions at the end, but you can always ask me anything:

documenting 20 cloud servicesacross 130 GitHub repositorieswith 728 contributors in 4 years

@annegentle, #[email protected]

Page 3: Git and GitHub for Documentation

GIT AND GITHUB

• 2005 born after spectacular Linux tooling failure

• Social web, leads to social coding

• Git is for command line, GitHub is the web interface

• Cross-platform tooling - Windows, Mac, Linux

• Merge files rather than a “lock and checkout” model

• Non-linear branching model

Page 4: Git and GitHub for Documentation

GITHUB VOCABULARY

Repository

Collection of stored code

Organization

Collection of repositories

Fork

Copy repository, copy of repository

Issue

Defects, tasks, or feature requests

Pull Request

Comparison of edits to see if team wants to accept changes

Commit

Point in time snapshot of repository with changes

Branch

Indicator of divergence from base

Page 5: Git and GitHub for Documentation

• Command line tool

• Only place for all the commands

GIT

Page 6: Git and GitHub for Documentation

• Web interface for git repositories

• http://github.com• Comments, reviews, emojis

GITHUB

Page 7: Git and GitHub for Documentation

LET’S TALK ABOUTPAIN POINTS

“Meet the deadline.”

“What can we get rid of before the deadline? I know…”

“Let’s do Agile, but…”

“Devs rule - docs drool.”

flickr :cobalt123

Page 8: Git and GitHub for Documentation

WRITING IN ISOLATION

flickr :mtischendorf

Page 9: Git and GitHub for Documentation

COLLABORATE WHERE USERS ARE• Curate the audience

• Write with and for the audience

• Reward the audience

Page 10: Git and GitHub for Documentation

I NEED A WRITER1. Sacrifice your first-born for headcount

and job description.2. Come up with a pay scale.3. Get a handful of resumes that don’t

meet the requirements.4. Cry.

flickr :eclecticechoes

Page 11: Git and GitHub for Documentation

Ensure that contributors are valued and rewarded!

• Sense of belonging• Pay it forward (reciprocity)• Effective, time-saving, user support• Reputation, recruiting

MOTIVATIONS

flickr :seeminglee

Page 12: Git and GitHub for Documentation

LET’S CURATEAuthors

ProcessesTools

MindsetsAttitudes

Jobs

flickr :roswellsgirl

Page 13: Git and GitHub for Documentation

TREAT DOCS LIKE CODE

flickr :roswellsgirl

Page 14: Git and GitHub for Documentation

LONGTAIL CONTRIBUTIONS• Rise of the niche

• Finding like-minded people interested in your content

• Dark corners of knowledge gap are filled with docs

Page 15: Git and GitHub for Documentation

THE DOCS SUCKIn what way?

Which page?

How can I get it not to suck?

flickr :heidiandmatt

Page 16: Git and GitHub for Documentation

DOC ISSUES TRACKING• Tasks, outright errors, and

feature requests

• I’ll triage the issue and guide you in fixing it, issue reporter

• https://guides.github.com/features/issues/

Page 17: Git and GitHub for Documentation

WRITERS NEVER GET REVIEWSDocumentation system so separate from code system that technical reviews are through email

or

*gasp*

frozen-in-time PDF files

flickr :elkaypics

Page 18: Git and GitHub for Documentation

REVIEWERS FIX DOCS“This is wrong, here’s how to fix it.”

• Working in the same collaboration tools as technical people gives better reviews

• We can merge as many as 50 patches per day; running four automated tests per patch and requiring two humans to check the patch and click in order to publish

Page 19: Git and GitHub for Documentation

UNFAIR TREATMENT

Docs ghetto

flickr :mtischendorf

Page 20: Git and GitHub for Documentation

VALUE PROPOSITIONWriter contributions, when treated like code, are valued equally with developer code

Page 21: Git and GitHub for Documentation

WHITE COAT TOOLSClosely guarded secrets of proprietary toolchains with expensive per-seat licenses.

or

Secret developer workflows are mysterious to writers.

flickr :darthnick

Page 22: Git and GitHub for Documentation

BEAUTIFUL DOCS

• Widely accepted tooling built in the open so we make it work for us and for devs (readthedocs.org)

• Simple markup

• Flat file builds

• We can patch and log issues against the tooling

Page 23: Git and GitHub for Documentation

ONLY DEV TEAMS GET CI/CD

Deploying containers and micro services oh my.

Docs, use some horrifyingly slow proprietary tool, kthnxbai.

flickr : photohome_uk

Page 24: Git and GitHub for Documentation

CI/CD FOR ALL

• Docs can be published automatically after reviewers merge them

• Docs can have simple tests to ensure quality and that you “don’t break the build.”

• Scrape the code to build more helpful docs (especially reference)

• https://opensource.com/business/15/7/continuous-integration-and-continuous-delivery-documentation

flickr :pedrovezini

Page 25: Git and GitHub for Documentation

DRAFTS FOR REVIEWS

• Static site generation from a branch or fork

• Enables publishing both drafts and final output

flickr :denverjeffrey

Page 26: Git and GitHub for Documentation

WHAT PAIRS WELL WITH GITHUB?• Simple markup: Markdown, Middleman, RST• GitHub Pages: http://pages.github.com • Static site generators: https://staticsitegenerators.net/• Well-documented style guide and contributor guide• Open licensing: Creative Commons• PenFlip is “GitHub for Writers”• Borrowing development techniques

Page 27: Git and GitHub for Documentation

WHO USES GIT AND GITHUB FOR WRITING?

• O’Reilly Media for book publishing

• GitHub uses GitHub to document GitHub

• OpenStack uses open source Git

• Rackspace Cloud documentation uses GitHub

Page 28: Git and GitHub for Documentation

WHAT ARE SOME DIFFICULTIES?

• Scope and scale questions• Official-ness• Identity• Naming

flickr :lamont_cranston

Page 29: Git and GitHub for Documentation

GITHUB BENEFITS• Collaborate where users are• Motivate more contributors; track and reward contributions• Version control; release management; CI/CD• Track issues for distributed assignments and improved quality• Create a quality bar for entry• Enable fine-grained reviews and attract more reviewers• Automate tedious tasks• Coach writing skills and build better writers out of subject matter experts• Review incoming contributions; establish specialty teams for reviews• Build reputation and street credibility with metrics

Page 30: Git and GitHub for Documentation

flickr :lnx

DISTRIBUTED ASSIGNMENTS

Page 31: Git and GitHub for Documentation

You shall not pass… • test style guide• test syntax • test build

QUALITY GATE

flickr :davebloggs007

Page 32: Git and GitHub for Documentation

END THE TEDIUM ENABLE THE ROBOTS

• Build the docs and publish them to drafts or staging area

• Docs are always available for reviews

flickr :hddod

Page 33: Git and GitHub for Documentation

COACH BETTER WRITING• Become the experts and

consultants while enabling others to improve their writing

• The people with the knowledge can become better writers and learn more empathy by writing for the users

flickr : philgaldys

Page 34: Git and GitHub for Documentation

CREATE TEAMS

• We now divide the work by deliverable: user guides, install guides, configuration guides

• We scrape the code as often as we can to deliver continuously

flickr :mortimer

Page 35: Git and GitHub for Documentation

BUILD A REPUTATION• Measure quality and

quantity

• Count contributions and improvements

• Compare over time; benchmark and reward

flickr :turbojoe

Page 36: Git and GitHub for Documentation

“We’re crazy, but we’re writing a book in five days.”

- Anne Gentle

https://www.youtube.com/watch?v=lYfHEy6E2n0

Page 37: Git and GitHub for Documentation

Ask me. Challenge me. Find out.

flickr :candelabrumdanse

Page 38: Git and GitHub for Documentation

The hope “that deficiencies in program specifications could be made up by the skill of a technical writing

department… was misguided; the design of a program and the design of its specification must be

undertaken in parallel by the same person, and they must interact with each other.”

- C.A.R. Hoare, 1980

flickr :roswellsgirl

Page 39: Git and GitHub for Documentation