This session will be recorded
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1535120/filmtocat.png)
Git & Github
An introduction
Note
Different editors have different preferences for using Github. Please talk to the editor of the delivery you want to contribute to.
Contributions
welcome!
Git
„Git is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows.“
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1526533/what-is-vcs.png)
Repository
Stores all versions and associated metadata for the project
Local & Remote Repositories
In Git, every computer has a complete copy of the repository (Local Repositories)
All changes can then be synced to a central remote repository
Commit
A Commit is a specific set of changes that is submitted to the repository, creating a new version (of the committed files)
each commit has a “commit message” that describes what was archived with this commit
Branches
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1526605/multiple-contexts.png)
Branches
- Easy to create
- helps to concentrate on one change
- can later be merged into the “main” branch
- avoids collisions from multiple editors
no need for CLI
Source tree
Mac & Windows
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534332/sourcetree-hero-mac-log.png)
Github for Windows
Windows
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534334/screenshot-overview_2x.png)
Github for Mac
Mac
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534335/screen1.png)
Github
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1532736/Octocat.png)
A GUI for Remote Repositories
C
provides other project management helpers,
such as:
Issue management
Wiki
Milestones
Each delivery has its own repository
For example:
- github.com/w3c/wai-tutorials/
- github.com/w3c/wai-quick-start/
- github.com/w3c/wai-wcag-quickref/
Edit Files
Github
O
All kinds of file types
- HTML
- CSS/SASS/…
- JavaScript
- PHP/Ruby/Python/…
- Markdown
(Also w/ YAML FRONTMATTER)
ISSUES
Pull requests
Reference syntax
- @username – notifies a user about a comment
(Pretty much like @-replies on Twitter) - #123 – References that issue
- 6f8bddc011 – references that commit
Github flavored Markdown
When to use what?!
Issues
- General feedback
- Discussing passages of documents
- collecting opinions
Writing
“good”
Issues
Always provide a link to the page in question
Or, if possible, a link to the section of the page
Keep the issue clear, concise and focused on a specific issue
Bad: “I don’t like content of page X”
good: “On page X the wording in the introduction is unclear.”
Pull requests
- Concrete text/code proposals
- implementing changes that have already been discussed
- Typos & grammar corrections
creating
“good”
pull requests
Make “atomar” changes
- If there are multiple, independent wording changes, create multiple pull requests
- if it’s a change throughout a page (or repository), one pull request is enough
Github workflow
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534368/Understanding_the_GitHub_Flow___GitHub_Guides.png)
Create branch
Github workflow
Commit changes
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534383/Understanding_the_GitHub_Flow___GitHub_Guides.png)
Github workflow
Open a pull request
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534387/Understanding_the_GitHub_Flow___GitHub_Guides.png)
Github workflow
Discuss and (optionally) add more commits
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534390/Understanding_the_GitHub_Flow___GitHub_Guides.png)
Github workflow
Merge
![](https://s3.amazonaws.com/media-p.slid.es/uploads/335005/images/1534394/Understanding_the_GitHub_Flow___GitHub_Guides.png)
Git & Github — An Introduction
By Eric Eggert
Git & Github — An Introduction
- 6,445