Tomas Petricek
email: t.petricek@kent.ac.uk
twitter: @tomaspetricek
office: S129A
Git for source control with extra features
Help teams plan and collaborate
Manage issues, notes, plans, contributions
"Social network" for open source software
Other things a project needs
Why open source uses GitHub
GitHub projects
Git repository with history, branches etc.
README and a few other special files
Additional features
not based on Git
Fork a project to create your clone in your profile
Send pull requests between multiple forks
Track issues and organise projects
Use wiki for keeping notes and documentation
Working with remote repositories
Same thing as your
local repository!
Clone to copy data
Pull to fetch changes
Push to update remote
Clone a remote repository from GitHub
1: 2: 3: 4: 5: 6: |
|
1:
|
|
Modify repository locally offline
1: 2: 3: |
|
Push local changes to remote repository
1: 2: 3: 4: 5: 6: 7: |
|
Retrieve changes done by others
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: |
|
Using branches in one project
Using forks across projects
GitHub pull requests
Sending contributions
back to project owner
Owner has write rights,
way to discuss changes
Works within projects too
Linux uses patches and emails, not PRs!
❶ Create project (GitHub) - Add members as owners
❷ Clone repository (git) - From GitHub to your computer
❸ Commit changes (git) - All in your local repository
❹ Push changes (git) - Use a new branch to allow review
❺ Send a pull request (GitHub) - In a project to merge
❶ Fork project (GitHub) - Online copy in your profile
❷ Clone repository (git) - From GitHub to your computer
❸ Commit changes (git) - All in your local repository
❹ Push changes (git) - From your computer to GitHub
❺ Send a pull request (GitHub) - Online to the owner
Life of an open-source project maintainer can be tough!
Maintainer - 1 hour a day, week or month
Someone to merge changes, build releases, explain issues
Core developers - irregular, but more time
To implement major new features in the software
Contributors - a couple of hours or days
Improvements, fixing bugs, better documentation
Even small things matter
How to do it well
Good contributing
Read the guidelines
On Github typically in CONTRIBUTING.md
file
Follow guidelines
Where to discuss, how to comment and explain
Collaborative development using GitHub
Forks, pull requests, issues, etc.
Working with PRs, working with branches
GitHub and open source
Typical open source contribution workflow
Contributing to open-source projects
What you should remember from this lecture
Tomas Petricek
t.petricek@kent.ac.uk | @tomaspetricek