Lesson 5 Collaborating on GitHub

In this lesson, we will explore the various features and tools available on GitHub for collaborating with others on projects. You will learn how to invite collaborators, manage permissions, and work with issues and pull requests to streamline your collaborative workflow.

Objectives

  • Understand the concept of collaborators on GitHub
  • Learn how to invite collaborators and manage permissions
  • Discover how to collaborate using issues and pull requests

Inviting collaborators

To invite someone to collaborate on your GitHub repository, navigate to the Settings tab of your repository, and then click on Manage access. Click on Invite a collaborator and enter their GitHub username or email address. They will receive an invitation to join the repository and can accept it to start collaborating.

Managing permissions

When inviting collaborators, you can assign different permission levels to control their access to the repository. There are three permission levels: Read, Write, and Admin. Read allows users to view the repository, Write allows users to make changes and submit pull requests, and Admin allows users to manage the repository settings and collaborators.

Collaborating with issues and pull requests

Issues and pull requests are essential tools for collaborating on GitHub. Issues are used to track bugs, feature requests, and other tasks, while pull requests are used to propose changes to the codebase. Collaborators can comment on issues and pull requests, review code changes, and merge approved changes into the main branch.

Exercises

Invite a collaborator

Invite GitHub user eriknewland to collaborate on one of your repositories. Navigate to the Settings tab of your repository, click on Manage access, and then click on Invite a collaborator. Enter the username eriknewland and send the invitation.

Create an issue

Create an issue in your repository to track a bug or feature request. Navigate to the Issues tab of your repository, click on New Issue, and fill in the required information. Assign the issue to yourself or another collaborator.

Fix the Issue

Create a branch to address the issue you just created. Switch to your branch, write your code, add, commit, and push your changes to your main branch.