CO886: Software Engineering
Tools for collaborative development

Tomas Petricek

twitter: @tomaspetricek
office: S129A

Collaborative development

GitHub, GitLab, etc.

Commercial infrastructures around git

Git for source control with extra features

Help teams plan and collaborate

Manage issues, notes, plans, contributions

"Social network" for open source software

GitHub collaboration platform

Other things a project needs

  • Tracking issues and feature requests
  • Hosting documentation and notes
  • Integration with test runners, etc.

Why open source uses GitHub

  • Convenient way of storing my projects
  • Active developer community
  • GitHub is (a bit) like your CV
  • Why not? Not open-source itself...

GitHub as a CV

Use your GitHub profile to show your work!

Great if you are looking for your first job

Valid criticism of the GitHub as a CV idea

Collaboration and GitHub

GitHub projects

Git repository with history, branches etc.

README and a few other special files

Additional features
not based on Git

Additional GitHub features

What exists in GitHub, but not in 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

Working with remote repositories (1/3)

Clone a remote repository from GitHub

$ git clone
Cloning into 'test'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.

Go to the new folder and edit the code

$ cd test/

Working with remote repositories (2/3)

Modify repository locally offline

$ git commit -am "Modifying readme for test project"
[master 59bb116] Modifying readme for test project
1 file changed, 1 insertion(+), 1 deletion(-)

Push local changes to remote repository

$ git push origin master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 271 bytes | 271.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
   59ea774..59bb116  master -> master

Working with remote repositories (3/3)

Retrieve changes done by others

$ git pull origin master
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
 * branch            master     -> FETCH_HEAD
   59bb116..1fd8ceb  master     -> origin/master
Updating 59bb116..1fd8ceb
Fast-forward | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Demo: GitHub projects, git push and pull

Branches, forks and pull requests

Collaborating on GitHub

Using branches in one project

  • Single GitHub project
  • Everyone in team has access
  • Good for small teams you trust

Using forks across projects

  • Each contributor has a fork
  • Main project has one or few owners
  • Good for allowing strangers to contribute

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!

Collaborating on a project

Typical workflow when using branches

❶ 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

Demo: Working with branches on GitHub

Contributing to a project

Typical workflow when using forks

❶ 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

Demo: Working with forks on GitHub

Contributing to open-source

Life of an open-source project maintainer can be tough!

Contributing to open-source

What open-source projects need to live?

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

Contributing to open-source

Even small things matter

  • Minor bug fixes and typos
  • Documentation improvements
  • Good bug reports

How to do it well

  • Follow style and contributing guidelines
  • Report issues with minimal example
  • Small to large builds trust & communicate well

Good contributing

Read the guidelines
On Github typically in file

Follow guidelines
Where to discuss, how to comment and explain


Tools for collaborative development

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

CO886: Tools for collaborative development

What you should remember from this lecture

  • GitHub forks, pull requests, etc.
  • What is in git vs. what is in GitHub

Tomas Petricek | @tomaspetricek