Upload
eric-eggert
View
630
Download
1
Embed Size (px)
Citation preview
Git & GithubGit & GithubAn introduction
Eric Eggert
W3C/WAI
w3.org/People/Yatil
NoteNoteDifferent editors have different
preferences for using Github.Please talk to the editor of the
delivery you want to contribute to.
GitGit„Git is a distributed revision
control system with an emphasis onspeed, data integrity, and support
for distributed, non-linearworkflows.“
http://www.git-tower.com/learn/git/ebook/command-line/basics/what-is-version-control
Local & RemoteLocal & RemoteRepositoriesRepositories
In Git, every computer has acomplete copy of the repository
(Local Repositories)
All changes can then be synced to acentral remote repository
CommitCommitA Commit is a specific set of
changes that is submitted to therepository, creating a new version
(of the committed files)
each commit has a “commit message”that describes what was archived
with this commit
BranchesBranches1. Easy to create2. helps to concentrate on one change3. can later be merged into the “main” branch4. avoids collisions from multiple editors
A GUI for A GUI for RemoteRemote Repositories Repositories
Cprovides other project management helpers,
such as:
Issue management
Wiki
Milestones
Each delivery has its ownEach delivery has its ownrepositoryrepository
For example:
github.com/w3c/wai-tutorials/github.com/w3c/wai-quick-start/github.com/w3c/wai-wcag-quickref/
All kinds of file typesAll kinds of file types
HTMLCSS/SASS/…JavaScriptPHP/Ruby/Python/…Markdown(Also w/ YAML FRONTMATTER)
Reference syntaxReference syntax
@username – notifies a user about a comment(Pretty much like @-replies on Twitter)#123 – References that issue6f8bddc011 – references that commit
Always provide a link to the pageAlways provide a link to the pagein questionin question
Or, if possible, a link to the section of the page
Keep the issue clear, concise andKeep the issue clear, concise andfocused on a specific issuefocused on a specific issue
Bad: “I don’t like content of page X”Bad: “I don’t like content of page X”
good: “On page X the wording in thegood: “On page X the wording in theintroduction is unclear.”introduction is unclear.”
Pull requestsPull requestsConcrete text/code proposalsimplementing changes that have already beendiscussedTypos & grammar corrections
Make “atomar” changesMake “atomar” changes
If there are multiple, independent wordingchanges, create multiple pull requestsif it’s a change throughout a page (or repository),one pull request is enough